Home
last modified time | relevance | path

Searched refs:journal (Results 1 – 25 of 62) sorted by relevance

123

/linux/drivers/md/dm-vdo/
H A Drecovery-journal.c67 static inline atomic_t *get_zone_count_ptr(struct recovery_journal *journal, in get_zone_count_ptr() argument
72 ? &journal->lock_counter.logical_zone_counts[lock_number] in get_zone_count_ptr()
73 : &journal->lock_counter.physical_zone_counts[lock_number]); in get_zone_count_ptr()
85 static inline u16 *get_counter(struct recovery_journal *journal, in get_counter() argument
89 struct lock_counter *counter = &journal->lock_counter; in get_counter()
101 static atomic_t *get_decrement_counter(struct recovery_journal *journal, in get_decrement_counter() argument
104 return &journal->lock_counter.journal_decrement_counts[lock_number]; in get_decrement_counter()
114 static bool is_journal_zone_locked(struct recovery_journal *journal, in is_journal_zone_locked() argument
117 u16 journal_value = *get_counter(journal, lock_number, VDO_ZONE_TYPE_JOURNAL, 0); in is_journal_zone_locked()
118 u32 decrements = atomic_read(get_decrement_counter(journal, lock_number)); in is_journal_zone_locked()
[all …]
H A Dslab-depot.c48 static inline struct journal_lock * __must_check get_lock(struct slab_journal *journal, in get_lock() argument
51 return &journal->locks[sequence_number % journal->size]; in get_lock()
66 static inline bool __must_check must_make_entries_to_flush(struct slab_journal *journal) in must_make_entries_to_flush() argument
68 return ((journal->slab->status != VDO_SLAB_REBUILDING) && in must_make_entries_to_flush()
69 vdo_waitq_has_waiters(&journal->entry_waiters)); in must_make_entries_to_flush()
78 static inline bool __must_check is_reaping(struct slab_journal *journal) in is_reaping() argument
80 return (journal->head != journal->unreapable); in is_reaping()
87 static void initialize_tail_block(struct slab_journal *journal) in initialize_tail_block() argument
89 struct slab_journal_block_header *header = &journal->tail_header; in initialize_tail_block()
91 header->sequence_number = journal->tail; in initialize_tail_block()
[all …]
H A Drecovery-journal.h122 struct recovery_journal *journal; member
229 vdo_get_recovery_journal_block_number(const struct recovery_journal *journal, in vdo_get_recovery_journal_block_number() argument
236 return vdo_compute_recovery_journal_block_number(journal->size, sequence); in vdo_get_recovery_journal_block_number()
247 vdo_compute_recovery_journal_check_byte(const struct recovery_journal *journal, in vdo_compute_recovery_journal_check_byte() argument
251 return (((sequence / journal->size) & 0x7F) | 0x80); in vdo_compute_recovery_journal_check_byte()
261 void vdo_free_recovery_journal(struct recovery_journal *journal);
263 void vdo_initialize_recovery_journal_post_repair(struct recovery_journal *journal,
270 vdo_get_journal_block_map_data_blocks_used(struct recovery_journal *journal);
272 thread_id_t __must_check vdo_get_recovery_journal_thread_id(struct recovery_journal *journal);
274 void vdo_open_recovery_journal(struct recovery_journal *journal,
[all …]
H A Drepair.c714 static struct packed_journal_sector * __must_check get_sector(struct recovery_journal *journal, in get_sector() argument
721 offset = ((vdo_get_recovery_journal_block_number(journal, sequence) * VDO_BLOCK_SIZE) + in get_sector()
798 struct recovery_journal *journal = vdo->recovery_journal; in add_slab_journal_entries() local
807 advance_points(repair, journal->entries_per_block)) { in add_slab_journal_entries()
1161 get_recovery_journal_block_header(struct recovery_journal *journal, char *data, in get_recovery_journal_block_header() argument
1165 vdo_get_recovery_journal_block_number(journal, sequence); in get_recovery_journal_block_header()
1183 static bool __must_check is_valid_recovery_journal_block(const struct recovery_journal *journal, in is_valid_recovery_journal_block() argument
1187 if ((header->nonce != journal->nonce) || in is_valid_recovery_journal_block()
1188 (header->recovery_count != journal->recovery_count)) in is_valid_recovery_journal_block()
1192 return (header->entry_count <= journal->entries_per_block); in is_valid_recovery_journal_block()
[all …]
H A Dblock-map.h269 struct recovery_journal *journal; member
335 struct recovery_journal *journal, nonce_t nonce,
356 struct recovery_journal *journal);
/linux/fs/jbd2/
H A Dtransaction.c80 static void jbd2_get_transaction(journal_t *journal, in jbd2_get_transaction() argument
83 transaction->t_journal = journal; in jbd2_get_transaction()
86 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction()
87 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction()
90 journal->j_transaction_overhead_buffers + in jbd2_get_transaction()
91 atomic_read(&journal->j_reserved_credits)); in jbd2_get_transaction()
97 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires); in jbd2_get_transaction()
98 add_timer(&journal->j_commit_timer); in jbd2_get_transaction()
100 J_ASSERT(journal->j_running_transaction == NULL); in jbd2_get_transaction()
101 journal->j_running_transaction = transaction; in jbd2_get_transaction()
[all …]
H A Drevoke.c131 static inline int hash(journal_t *journal, unsigned long long block) in hash() argument
133 return hash_64(block, journal->j_revoke->hash_shift); in hash()
136 static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr, in insert_revoke_hash() argument
151 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash()
152 spin_lock(&journal->j_revoke_lock); in insert_revoke_hash()
154 spin_unlock(&journal->j_revoke_lock); in insert_revoke_hash()
160 static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal, in find_revoke_record() argument
166 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record()
168 spin_lock(&journal->j_revoke_lock); in find_revoke_record()
172 spin_unlock(&journal->j_revoke_lock); in find_revoke_record()
[all …]
H A DMakefile8 jbd2-objs := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
/linux/fs/ocfs2/
H A Djournal.c62 static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal,
155 ocfs2_queue_recovery_completion(osb->journal, i, NULL, in ocfs2_queue_replay_slots()
316 struct ocfs2_journal *journal = NULL; in ocfs2_commit_cache() local
318 journal = osb->journal; in ocfs2_commit_cache()
321 down_write(&journal->j_trans_barrier); in ocfs2_commit_cache()
323 flushed = atomic_read(&journal->j_num_trans); in ocfs2_commit_cache()
326 up_write(&journal->j_trans_barrier); in ocfs2_commit_cache()
330 jbd2_journal_lock_updates(journal->j_journal); in ocfs2_commit_cache()
331 status = jbd2_journal_flush(journal->j_journal, 0); in ocfs2_commit_cache()
332 jbd2_journal_unlock_updates(journal->j_journal); in ocfs2_commit_cache()
[all …]
H A Djournal.h78 static inline void ocfs2_set_ci_lock_trans(struct ocfs2_journal *journal, in ocfs2_set_ci_lock_trans() argument
82 ci->ci_last_trans = journal->j_trans_id; in ocfs2_set_ci_lock_trans()
94 struct ocfs2_journal *journal = in ocfs2_ci_fully_checkpointed() local
95 OCFS2_SB(ocfs2_metadata_cache_get_super(ci))->journal; in ocfs2_ci_fully_checkpointed()
98 ret = time_after(journal->j_trans_id, ci->ci_last_trans); in ocfs2_ci_fully_checkpointed()
110 struct ocfs2_journal *journal = in ocfs2_ci_is_new() local
111 OCFS2_SB(ocfs2_metadata_cache_get_super(ci))->journal; in ocfs2_ci_is_new()
114 ret = !(time_after(journal->j_trans_id, ci->ci_created_trans)); in ocfs2_ci_is_new()
137 ci->ci_created_trans = osb->journal->j_trans_id; in ocfs2_ci_set_new()
176 int ocfs2_journal_wipe(struct ocfs2_journal *journal,
[all …]
H A Dinode.c126 journal_t *journal = osb->journal->j_journal; in ocfs2_iget() local
173 if (journal) { in ocfs2_iget()
178 read_lock(&journal->j_state_lock); in ocfs2_iget()
179 if (journal->j_running_transaction) in ocfs2_iget()
180 transaction = journal->j_running_transaction; in ocfs2_iget()
182 transaction = journal->j_committing_transaction; in ocfs2_iget()
186 tid = journal->j_commit_sequence; in ocfs2_iget()
187 read_unlock(&journal->j_state_lock); in ocfs2_iget()
1286 if (!osb->journal) in ocfs2_clear_inode()
1289 jbd2_journal_release_jbd_inode(osb->journal->j_journal, in ocfs2_clear_inode()
/linux/include/trace/events/
H A Djbd2.h16 TP_PROTO(journal_t *journal, int result),
18 TP_ARGS(journal, result),
26 __entry->dev = journal->j_fs_dev->bd_dev;
36 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
38 TP_ARGS(journal, commit_transaction),
47 __entry->dev = journal->j_fs_dev->bd_dev;
59 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
61 TP_ARGS(journal, commit_transaction)
66 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
68 TP_ARGS(journal, commit_transaction)
[all …]
/linux/Documentation/filesystems/ext4/
H A Djournal.rst6 Introduced in ext3, the ext4 filesystem employs a journal to protect the
8 to 10,240,000 file system blocks (see man mke2fs(8) for more details on journal
12 cache, a record of the data being committed is also written to the journal. At
13 some later point in time, the journal code writes the transactions to their
16 crash during the second slow write, the journal can be replayed all the
18 gets written through the journal to the disk. The effect of this is to
23 through the journal. This means that file data blocks are /not/
26 option to control journal behavior. If ``data=journal``, all data and
27 metadata are written to disk through the journal. This is slower but
29 disk before the metadata are written to disk through the journal.
[all …]
/linux/Documentation/admin-guide/device-mapper/
H A Ddm-integrity.rst12 To guarantee write atomicity, the dm-integrity target uses journal, it
13 writes sector data and integrity tags into a journal, commits the journal
29 instead of a journal. If a bit in the bitmap is 1, the corresponding
32 is faster than the journal mode, because we don't have to write the data
75 D - direct writes (without journal)
82 journal and atomicity is guaranteed. In case of crash,
90 R - recovery mode - in this mode, journal is not replayed,
106 The size of journal, this argument is used only if formatting the
124 The journal watermark in percents. When the size of the journal
125 exceeds this watermark, the thread that flushes the journal will
[all …]
H A Ddm-raid.rst202 This option adds a journal device to raid4/5/6 raid sets and
205 The journal device is used as writethrough thus causing writes to
207 Takeover/reshape is not possible with a raid4/5/6 journal device;
213 If 'writeback' is selected the journal device has to be resilient
321 <journal_char> - 'A' - active write-through journal device.
322 - 'a' - active write-back journal device.
323 - 'D' - dead journal device.
324 - '-' - no journal device.
472 1.10.0 Add support for raid4/5/6 journal device
476 1.11.1 Add raid4/5/6 journal write-back support via journal_mode option
/linux/Documentation/filesystems/
H A Djournalling.rst12 how you decide to allocate the physical media on which the journal
15 for journal stored on a raw device (in a continuous range of blocks). A
21 journal file. The journalling layer expects the space for the journal
23 When loading the journal you must call jbd2_journal_load() to process
24 journal contents. If the client file system detects the journal contents
26 may call jbd2_journal_wipe() to clear the journal contents before
31 transactions in the journal and similarly jbd2_journal_load() will
38 You still need to actually journal your filesystem changes, this is done
40 the modification of each of the buffers with calls to the journal layer,
70 jbd2_journal_destroy() to clean up your in-core journal object.
[all …]
/linux/fs/ext4/
H A Dfast_commit.c967 static int ext4_fc_flush_data(journal_t *journal) in ext4_fc_flush_data() argument
969 struct super_block *sb = journal->j_private; in ext4_fc_flush_data()
975 ret = jbd2_submit_inode_data(journal, ei->jinode); in ext4_fc_flush_data()
981 ret = jbd2_wait_inode_data(journal, ei->jinode); in ext4_fc_flush_data()
990 static int ext4_fc_commit_dentry_updates(journal_t *journal, u32 *crc) in ext4_fc_commit_dentry_updates() argument
992 struct super_block *sb = journal->j_private; in ext4_fc_commit_dentry_updates()
1039 static int ext4_fc_perform_commit(journal_t *journal) in ext4_fc_perform_commit() argument
1041 struct super_block *sb = journal->j_private; in ext4_fc_perform_commit()
1063 ret = ext4_fc_flush_data(journal); in ext4_fc_perform_commit()
1098 jbd2_journal_lock_updates(journal); in ext4_fc_perform_commit()
[all …]
H A Dext4_jbd2.c67 journal_t *journal; in ext4_journal_check_start() local
79 journal = EXT4_SB(sb)->s_journal; in ext4_journal_check_start()
85 if (journal && is_journal_aborted(journal)) { in ext4_journal_check_start()
86 ext4_abort(sb, -journal->j_errno, "Detected aborted journal"); in ext4_journal_check_start()
97 journal_t *journal; in __ext4_journal_start_sb() local
111 journal = EXT4_SB(sb)->s_journal; in __ext4_journal_start_sb()
112 if (!journal || (EXT4_SB(sb)->s_mount_state & EXT4_FC_REPLAY)) in __ext4_journal_start_sb()
114 return jbd2__journal_start(journal, blocks, rsv_blocks, revoke_creds, in __ext4_journal_start_sb()
H A Dfsync.c101 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_fsync_journal() local
111 if (journal->j_flags & JBD2_BARRIER && in ext4_fsync_journal()
112 !jbd2_trans_will_send_data_barrier(journal, commit_tid)) in ext4_fsync_journal()
115 return ext4_fc_commit(journal, commit_tid); in ext4_fsync_journal()
H A Dblock_validity.c354 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_check_blockref() local
356 if (journal && inode == journal->j_inode) in ext4_check_blockref()
H A Dinode.c383 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in __check_block_validity() local
385 if (journal && inode == journal->j_inode) in __check_block_validity()
3424 journal_t *journal = EXT4_JOURNAL(folio->mapping->host); in __ext4_journalled_invalidate_folio() local
3434 return jbd2_journal_invalidate_folio(journal, folio, offset, length); in __ext4_journalled_invalidate_folio()
3448 journal_t *journal = EXT4_JOURNAL(inode); in ext4_release_folio() local
3455 if (journal) in ext4_release_folio()
3456 return jbd2_journal_try_to_free_buffers(journal, folio); in ext4_release_folio()
3463 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_inode_datasync_dirty() local
3465 if (journal) { in ext4_inode_datasync_dirty()
3466 if (jbd2_transaction_committed(journal, in ext4_inode_datasync_dirty()
[all …]
/linux/fs/f2fs/
H A Dnode.c567 struct f2fs_journal *journal = curseg->journal; in f2fs_get_node_info() local
609 i = f2fs_lookup_journal_in_cursum(journal, NAT_JOURNAL, nid, 0); in f2fs_get_node_info()
611 ne = nat_in_journal(journal, i); in f2fs_get_node_info()
2493 struct f2fs_journal *journal = curseg->journal; in scan_curseg_cache() local
2497 for (i = 0; i < nats_in_cursum(journal); i++) { in scan_curseg_cache()
2501 addr = le32_to_cpu(nat_in_journal(journal, i).block_addr); in scan_curseg_cache()
2502 nid = le32_to_cpu(nid_in_journal(journal, i)); in scan_curseg_cache()
2972 struct f2fs_journal *journal = curseg->journal; in remove_nats_in_journal() local
2977 for (i = 0; i < nats_in_cursum(journal); i++) { in remove_nats_in_journal()
2980 nid_t nid = le32_to_cpu(nid_in_journal(journal, i)); in remove_nats_in_journal()
[all …]
H A Dsegment.c2758 memcpy(&dst->journal, curseg->journal, SUM_JOURNAL_SIZE); in write_current_sum_page()
4306 memcpy(seg_i->journal, kaddr, SUM_JOURNAL_SIZE); in read_compacted_summaries()
4310 memcpy(seg_i->journal, kaddr + SUM_JOURNAL_SIZE, SUM_JOURNAL_SIZE); in read_compacted_summaries()
4411 memcpy(curseg->journal, &sum->journal, SUM_JOURNAL_SIZE); in read_normal_summaries()
4428 struct f2fs_journal *sit_j = CURSEG_I(sbi, CURSEG_COLD_DATA)->journal; in restore_curseg_summaries()
4429 struct f2fs_journal *nat_j = CURSEG_I(sbi, CURSEG_HOT_DATA)->journal; in restore_curseg_summaries()
4484 memcpy(kaddr, seg_i->journal, SUM_JOURNAL_SIZE); in write_compacted_summaries()
4489 memcpy(kaddr + written_size, seg_i->journal, SUM_JOURNAL_SIZE); in write_compacted_summaries()
4548 int f2fs_lookup_journal_in_cursum(struct f2fs_journal *journal, int type, in f2fs_lookup_journal_in_cursum() argument
4554 for (i = 0; i < nats_in_cursum(journal); i++) { in f2fs_lookup_journal_in_cursum()
[all …]
/linux/drivers/md/bcache/
H A DMakefile6 journal.o movinggc.o request.o stats.o super.o sysfs.o trace.o\
/linux/Documentation/admin-guide/
H A Djfs.rst26 Do not write to the journal. The primary use of this option
32 Commit metadata changes to the journal. Use this option to

123