Home
last modified time | relevance | path

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

1234

/Linux-v4.19/fs/jbd2/
Djournal.c102 static void __journal_abort_soft (journal_t *journal, int errno);
167 journal_t *journal = from_timer(journal, t, j_commit_timer); in commit_timeout() local
169 wake_up_process(journal->j_task); in commit_timeout()
190 journal_t *journal = arg; in kjournald2() local
197 timer_setup(&journal->j_commit_timer, commit_timeout, 0); in kjournald2()
202 journal->j_task = current; in kjournald2()
203 wake_up(&journal->j_wait_done_commit); in kjournald2()
216 write_lock(&journal->j_state_lock); in kjournald2()
219 if (journal->j_flags & JBD2_UNMOUNT) in kjournald2()
223 journal->j_commit_sequence, journal->j_commit_request); in kjournald2()
[all …]
Dcheckpoint.c108 void __jbd2_log_wait_for_space(journal_t *journal) in __jbd2_log_wait_for_space() argument
113 nblocks = jbd2_space_needed(journal); in __jbd2_log_wait_for_space()
114 while (jbd2_log_space_left(journal) < nblocks) { in __jbd2_log_wait_for_space()
115 write_unlock(&journal->j_state_lock); in __jbd2_log_wait_for_space()
116 mutex_lock(&journal->j_checkpoint_mutex); in __jbd2_log_wait_for_space()
129 write_lock(&journal->j_state_lock); in __jbd2_log_wait_for_space()
130 if (journal->j_flags & JBD2_ABORT) { in __jbd2_log_wait_for_space()
131 mutex_unlock(&journal->j_checkpoint_mutex); in __jbd2_log_wait_for_space()
134 spin_lock(&journal->j_list_lock); in __jbd2_log_wait_for_space()
135 nblocks = jbd2_space_needed(journal); in __jbd2_log_wait_for_space()
[all …]
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 …]
Dcommit.c116 static int journal_submit_commit_record(journal_t *journal, in journal_submit_commit_record() argument
128 if (is_journal_aborted(journal)) in journal_submit_commit_record()
141 if (jbd2_has_feature_checksum(journal)) { in journal_submit_commit_record()
146 jbd2_commit_block_csum_set(journal, bh); in journal_submit_commit_record()
154 if (journal->j_flags & JBD2_BARRIER && in journal_submit_commit_record()
155 !jbd2_has_feature_async_commit(journal)) in journal_submit_commit_record()
169 static int journal_wait_on_commit_record(journal_t *journal, in journal_wait_on_commit_record() argument
212 static int journal_submit_data_buffers(journal_t *journal, in journal_submit_data_buffers() argument
219 spin_lock(&journal->j_list_lock); in journal_submit_data_buffers()
225 spin_unlock(&journal->j_list_lock); in journal_submit_data_buffers()
[all …]
Dtransaction.c79 jbd2_get_transaction(journal_t *journal, transaction_t *transaction) in jbd2_get_transaction() argument
81 transaction->t_journal = journal; in jbd2_get_transaction()
84 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction()
85 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction()
89 atomic_read(&journal->j_reserved_credits)); in jbd2_get_transaction()
95 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires); in jbd2_get_transaction()
96 add_timer(&journal->j_commit_timer); in jbd2_get_transaction()
98 J_ASSERT(journal->j_running_transaction == NULL); in jbd2_get_transaction()
99 journal->j_running_transaction = transaction; in jbd2_get_transaction()
145 static void wait_transaction_locked(journal_t *journal) in wait_transaction_locked() argument
[all …]
Drecovery.c39 static int do_one_pass(journal_t *journal,
67 static int do_readahead(journal_t *journal, unsigned int start) in do_readahead() argument
77 max = start + (128 * 1024 / journal->j_blocksize); in do_readahead()
78 if (max > journal->j_maxlen) in do_readahead()
79 max = journal->j_maxlen; in do_readahead()
87 err = jbd2_journal_bmap(journal, next, &blocknr); in do_readahead()
95 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead()
129 static int jread(struct buffer_head **bhp, journal_t *journal, in jread() argument
138 if (offset >= journal->j_maxlen) { in jread()
143 err = jbd2_journal_bmap(journal, offset, &blocknr); in jread()
[all …]
/Linux-v4.19/fs/reiserfs/
Djournal.c96 struct reiserfs_journal *journal);
117 struct reiserfs_journal *journal = SB_JOURNAL(sb); in init_journal_hash() local
118 memset(journal->j_hash_table, 0, in init_journal_hash()
159 struct reiserfs_journal *journal = SB_JOURNAL(sb); in get_bitmap_node() local
161 struct list_head *entry = journal->j_bitmap_nodes.next; in get_bitmap_node()
163 journal->j_used_bitmap_nodes++; in get_bitmap_node()
166 if (entry != &journal->j_bitmap_nodes) { in get_bitmap_node()
170 journal->j_free_bitmap_nodes--; in get_bitmap_node()
183 struct reiserfs_journal *journal = SB_JOURNAL(sb); in free_bitmap_node() local
184 journal->j_used_bitmap_nodes--; in free_bitmap_node()
[all …]
/Linux-v4.19/drivers/md/bcache/
Djournal.c38 struct journal_device *ja = &ca->journal; in journal_read_bucket()
42 struct jset *j, *data = ca->set->journal.w[0].data; in journal_read_bucket()
161 struct journal_device *ja = &ca->journal; in bch_journal_read()
266 c->journal.seq = list_entry(list->prev, in bch_journal_read()
279 struct journal *j = &c->journal; in bch_journal_mark()
374 (fifo_idx(&c->journal.pin, btree_current_write(l)->journal) < \
375 fifo_idx(&(c)->journal.pin, btree_current_write(r)->journal))
377 (fifo_idx(&c->journal.pin, btree_current_write(l)->journal) > \
378 fifo_idx(&(c)->journal.pin, btree_current_write(r)->journal))
392 spin_lock(&c->journal.lock); in btree_flush_write()
[all …]
Djournal.h104 struct journal { struct
158 (fifo_idx(&(c)->journal.pin, (l)) > fifo_idx(&(c)->journal.pin, (r)))
173 void bch_journal_next(struct journal *j);
/Linux-v4.19/fs/ocfs2/
Djournal.c77 static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal,
170 ocfs2_queue_recovery_completion(osb->journal, i, NULL, in ocfs2_queue_replay_slots()
311 struct ocfs2_journal *journal = NULL; in ocfs2_commit_cache() local
313 journal = osb->journal; in ocfs2_commit_cache()
316 down_write(&journal->j_trans_barrier); in ocfs2_commit_cache()
318 flushed = atomic_read(&journal->j_num_trans); in ocfs2_commit_cache()
321 up_write(&journal->j_trans_barrier); in ocfs2_commit_cache()
325 jbd2_journal_lock_updates(journal->j_journal); in ocfs2_commit_cache()
326 status = jbd2_journal_flush(journal->j_journal); in ocfs2_commit_cache()
327 jbd2_journal_unlock_updates(journal->j_journal); in ocfs2_commit_cache()
[all …]
Djournal.h94 static inline void ocfs2_set_ci_lock_trans(struct ocfs2_journal *journal, in ocfs2_set_ci_lock_trans() argument
98 ci->ci_last_trans = journal->j_trans_id; in ocfs2_set_ci_lock_trans()
110 struct ocfs2_journal *journal = in ocfs2_ci_fully_checkpointed() local
111 OCFS2_SB(ocfs2_metadata_cache_get_super(ci))->journal; in ocfs2_ci_fully_checkpointed()
114 ret = time_after(journal->j_trans_id, ci->ci_last_trans); in ocfs2_ci_fully_checkpointed()
126 struct ocfs2_journal *journal = in ocfs2_ci_is_new() local
127 OCFS2_SB(ocfs2_metadata_cache_get_super(ci))->journal; in ocfs2_ci_is_new()
130 ret = !(time_after(journal->j_trans_id, ci->ci_created_trans)); in ocfs2_ci_is_new()
153 ci->ci_created_trans = osb->journal->j_trans_id; in ocfs2_ci_set_new()
187 int ocfs2_journal_init(struct ocfs2_journal *journal,
[all …]
Dsuper.c302 "Journal", osb->journal->j_state, in ocfs2_osb_dump()
303 osb->journal->j_trans_id, in ocfs2_osb_dump()
304 atomic_read(&osb->journal->j_num_trans)); in ocfs2_osb_dump()
426 if (jbd2_journal_start_commit(osb->journal->j_journal, in ocfs2_sync_fs()
429 jbd2_log_wait_commit(osb->journal->j_journal, in ocfs2_sync_fs()
2035 jbd2_journal_check_used_features(osb->journal->j_journal, 0, 0, in ocfs2_journal_addressable()
2056 struct ocfs2_journal *journal; in ocfs2_initialize_super() local
2240 journal = kzalloc(sizeof(struct ocfs2_journal), GFP_KERNEL); in ocfs2_initialize_super()
2241 if (!journal) { in ocfs2_initialize_super()
2246 osb->journal = journal; in ocfs2_initialize_super()
[all …]
/Linux-v4.19/include/trace/events/
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-v4.19/include/linux/
Djbd2.h1265 int jbd2_journal_get_log_tail(journal_t *journal, tid_t *tid,
1267 int __jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block);
1268 void jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block);
1274 void __jbd2_journal_clean_checkpoint_list(journal_t *journal, bool destroy);
1276 void jbd2_journal_destroy_checkpoint(journal_t *journal);
1384 extern int jbd2_journal_load (journal_t *journal);
1386 extern int jbd2_journal_recover (journal_t *journal);
1402 extern int jbd2_journal_begin_ordered_truncate(journal_t *journal,
1405 extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode);
1461 extern void jbd2_journal_switch_revoke_table(journal_t *journal);
[all …]
/Linux-v4.19/Documentation/filesystems/ext4/ondisk/
Djournal.rst6 Introduced in ext3, the ext4 filesystem employs a journal to protect the
12 committed is also written to the journal. At some later point in time,
13 the journal code writes the transactions to their final locations on
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.
31 The journal inode is typically inode 8. The first 68 bytes of the
[all …]
/Linux-v4.19/Documentation/device-mapper/
Ddm-integrity.txt8 To guarantee write atomicity, the dm-integrity target uses journal, it
9 writes sector data and integrity tags into a journal, commits the journal
53 D - direct writes (without journal) - in this mode, journaling is
58 journal and atomicity is guaranteed. In case of crash,
62 R - recovery mode - in this mode, journal is not replayed,
73 The size of journal, this argument is used only if formatting the
91 The journal watermark in percents. When the size of the journal
92 exceeds this watermark, the thread that flushes the journal will
96 Commit time in milliseconds. When this time passes, the journal is
97 written. The journal is also written immediatelly if the FLUSH
[all …]
/Linux-v4.19/fs/ext4/
Dfsync.c99 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_sync_file() local
119 if (!journal) { in ext4_sync_file()
151 if (journal->j_flags & JBD2_BARRIER && in ext4_sync_file()
152 !jbd2_trans_will_send_data_barrier(journal, commit_tid)) in ext4_sync_file()
154 ret = jbd2_complete_transaction(journal, commit_tid); in ext4_sync_file()
Dext4_jbd2.c44 journal_t *journal; in ext4_journal_check_start() local
54 journal = EXT4_SB(sb)->s_journal; in ext4_journal_check_start()
60 if (journal && is_journal_aborted(journal)) { in ext4_journal_check_start()
70 journal_t *journal; in __ext4_journal_start_sb() local
78 journal = EXT4_SB(sb)->s_journal; in __ext4_journal_start_sb()
79 if (!journal) in __ext4_journal_start_sb()
81 return jbd2__journal_start(journal, blocks, rsv_blocks, GFP_NOFS, in __ext4_journal_start_sb()
Dsuper.c387 static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) in ext4_journal_commit_callback() argument
389 struct super_block *sb = journal->j_private; in ext4_journal_commit_callback()
391 int error = is_journal_aborted(journal); in ext4_journal_commit_callback()
434 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_handle_error() local
437 if (journal) in ext4_handle_error()
438 jbd2_journal_abort(journal, -EIO); in ext4_handle_error()
1188 journal_t *journal = EXT4_SB(sb)->s_journal; in bdev_try_to_free_page() local
1193 if (journal) in bdev_try_to_free_page()
1194 return jbd2_journal_try_to_free_buffers(journal, page, in bdev_try_to_free_page()
4551 static void ext4_init_journal_params(struct super_block *sb, journal_t *journal) in ext4_init_journal_params() argument
[all …]
Dinode.c227 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_evict_inode() local
230 jbd2_complete_transaction(journal, commit_tid); in ext4_evict_inode()
3265 journal_t *journal; in ext4_bmap() local
3305 journal = EXT4_JOURNAL(inode); in ext4_bmap()
3306 jbd2_journal_lock_updates(journal); in ext4_bmap()
3307 err = jbd2_journal_flush(journal); in ext4_bmap()
3308 jbd2_journal_unlock_updates(journal); in ext4_bmap()
3362 journal_t *journal = EXT4_JOURNAL(page->mapping->host); in __ext4_journalled_invalidatepage() local
3372 return jbd2_journal_invalidatepage(journal, page, offset, length); in __ext4_journalled_invalidatepage()
3385 journal_t *journal = EXT4_JOURNAL(page->mapping->host); in ext4_releasepage() local
[all …]
/Linux-v4.19/Documentation/filesystems/
Dindex.rst160 how you decide to allocate the physical media on which the journal
163 for journal stored on a raw device (in a continuous range of blocks). A
169 journal file. The journalling layer expects the space for the journal
171 When loading the journal you must call :c:func:`jbd2_journal_load` to process
172 journal contents. If the client file system detects the journal contents
174 may call :c:func:`jbd2_journal_wipe` to clear the journal contents before
179 transactions in the journal and similarly :c:func:`jbd2_journal_load` will
186 You still need to actually journal your filesystem changes, this is done
188 the modification of each of the buffers with calls to the journal layer,
218 :c:func:`jbd2_journal_destroy` to clean up your in-core journal object.
[all …]
Dgfs2-uevents.txt20 with no journal assigned), and read-only (with journal assigned) status
39 of journal recovery for one of the filesystems journals. It has
40 two environment variables, JID= which specifies the journal id which
43 for every journal recovered, whether it is during the initial mount
44 process or as the result of gfs_controld requesting a specific journal
89 If a journal is in use by the filesystem (journals are not
91 numeric journal id in all GFS2 uevents.
/Linux-v4.19/Documentation/filesystems/ext4/
Dext4.rst66 the filesystem with a large journal can also be helpful for
84 * journal checksumming for robustness, performance
108 replay the journal (and thus write to the
113 journal_checksum Enable checksumming of the journal transactions.
124 journal_dev=devnum When the external journal device's major/minor numbers
126 the new journal location. The journal device is
130 norecovery Don't load the journal on mounting. Note that
132 skipping the journal replay will lead to the
136 data=journal All data are committed into the journal prior to being
143 journal.
[all …]
/Linux-v4.19/fs/f2fs/
Dsegment.c2199 memcpy(&dst->journal, curseg->journal, SUM_JOURNAL_SIZE); in write_current_sum_page()
3226 memcpy(seg_i->journal, kaddr, SUM_JOURNAL_SIZE); in read_compacted_summaries()
3230 memcpy(seg_i->journal, kaddr + SUM_JOURNAL_SIZE, SUM_JOURNAL_SIZE); in read_compacted_summaries()
3330 memcpy(curseg->journal, &sum->journal, SUM_JOURNAL_SIZE); in read_normal_summaries()
3347 struct f2fs_journal *sit_j = CURSEG_I(sbi, CURSEG_COLD_DATA)->journal; in restore_curseg_summaries()
3348 struct f2fs_journal *nat_j = CURSEG_I(sbi, CURSEG_HOT_DATA)->journal; in restore_curseg_summaries()
3399 memcpy(kaddr, seg_i->journal, SUM_JOURNAL_SIZE); in write_compacted_summaries()
3404 memcpy(kaddr + written_size, seg_i->journal, SUM_JOURNAL_SIZE); in write_compacted_summaries()
3468 int f2fs_lookup_journal_in_cursum(struct f2fs_journal *journal, int type, in f2fs_lookup_journal_in_cursum() argument
3474 for (i = 0; i < nats_in_cursum(journal); i++) { in f2fs_lookup_journal_in_cursum()
[all …]
Dnode.c523 struct f2fs_journal *journal = curseg->journal; in f2fs_get_node_info() local
549 i = f2fs_lookup_journal_in_cursum(journal, NAT_JOURNAL, nid, 0); in f2fs_get_node_info()
551 ne = nat_in_journal(journal, i); in f2fs_get_node_info()
2185 struct f2fs_journal *journal = curseg->journal; in scan_curseg_cache() local
2189 for (i = 0; i < nats_in_cursum(journal); i++) { in scan_curseg_cache()
2193 addr = le32_to_cpu(nat_in_journal(journal, i).block_addr); in scan_curseg_cache()
2194 nid = le32_to_cpu(nid_in_journal(journal, i)); in scan_curseg_cache()
2620 struct f2fs_journal *journal = curseg->journal; in remove_nats_in_journal() local
2624 for (i = 0; i < nats_in_cursum(journal); i++) { in remove_nats_in_journal()
2627 nid_t nid = le32_to_cpu(nid_in_journal(journal, i)); in remove_nats_in_journal()
[all …]

1234