| /linux-6.15/drivers/md/dm-vdo/ |
| H A D | recovery-journal.c | 520 journal->last_write_acknowledged = journal->tail; in initialize_journal_state() 521 journal->block_map_head = journal->tail; in initialize_journal_state() 522 journal->slab_journal_head = journal->tail; in initialize_journal_state() 523 journal->block_map_reap_head = journal->tail; in initialize_journal_state() 524 journal->slab_journal_reap_head = journal->tail; in initialize_journal_state() 685 block->journal = journal; in initialize_recovery_block() 754 journal, NULL, &journal->flush_vio); in vdo_decode_recovery_journal() 974 set_journal_tail(journal, journal->tail + 1); in advance_tail() 1016 if ((journal->tail - get_recovery_journal_head(journal)) > journal->size) { in prepare_to_assign_entry() 1088 struct recovery_journal *journal = block->journal; in assign_entry() local [all …]
|
| H A D | slab-depot.c | 80 return (journal->head != journal->unreapable); in is_reaping() 102 journal->unreapable = journal->head; in initialize_journal_state() 103 journal->reap_lock = get_lock(journal, journal->unreapable); in initialize_journal_state() 104 journal->next_commit = journal->tail; in initialize_journal_state() 105 journal->summarized = journal->last_summarized = journal->tail; in initialize_journal_state() 401 journal->head = journal->unreapable; in finish_reaping() 490 if (journal->reap_lock == &journal->locks[journal->size]) in reap_slab_journal() 665 journal->head = journal->tail; in reopen_slab_journal() 715 journal->next_commit = journal->tail; in complete_write() 941 return journal->tail - journal->head; in journal_length() [all …]
|
| H A D | recovery-journal.h | 122 struct recovery_journal *journal; member 236 return vdo_compute_recovery_journal_block_number(journal->size, sequence); in vdo_get_recovery_journal_block_number() 251 return (((sequence / journal->size) & 0x7F) | 0x80); in vdo_compute_recovery_journal_check_byte() 261 void vdo_free_recovery_journal(struct recovery_journal *journal); 274 void vdo_open_recovery_journal(struct recovery_journal *journal, 283 vdo_record_recovery_journal(const struct recovery_journal *journal); 285 void vdo_add_recovery_journal_entry(struct recovery_journal *journal, 298 void vdo_release_journal_entry_lock(struct recovery_journal *journal, 301 void vdo_drain_recovery_journal(struct recovery_journal *journal, 305 void vdo_resume_recovery_journal(struct recovery_journal *journal, [all …]
|
| H A D | repair.c | 798 struct recovery_journal *journal = vdo->recovery_journal; in add_slab_journal_entries() local 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() 1233 repair->highest_tail = journal->tail; in find_recovery_journal_head_and_tail() 1234 for (i = 0; i < journal->size; i++) { in find_recovery_journal_head_and_tail() 1361 struct recovery_journal *journal, in extract_entries_from_block() argument 1380 get_sector(journal, repair->journal_data, sequence, i); in extract_entries_from_block() 1407 struct recovery_journal *journal = vdo->recovery_journal; in parse_journal_for_rebuild() local 1592 get_sector(journal, repair->journal_data, i, j); in parse_journal_for_recovery() 1700 physical_block_number_t pbn = journal->origin; in vdo_repair() [all …]
|
| /linux-6.15/fs/jbd2/ |
| H A D | journal.c | 827 if (journal->j_head == journal->j_last) in jbd2_journal_next_log_block() 828 journal->j_head = journal->j_first; in jbd2_journal_next_log_block() 844 if (journal->j_fc_off + journal->j_fc_first >= journal->j_fc_last) in jbd2_fc_get_buf() 932 err = journal->j_bmap(journal, &block); in jbd2_journal_bmap() 1191 s->journal = journal; in jbd2_seq_info_open() 1734 journal->j_head = journal->j_first; in journal_reset() 1737 journal->j_head = journal->j_first; in journal_reset() 1739 journal->j_tail = journal->j_head; in journal_reset() 1740 journal->j_free = journal->j_last - journal->j_first; in journal_reset() 2275 journal->j_fc_last = journal->j_last; in jbd2_journal_initialize_fast_commit() [all …]
|
| H A D | checkpoint.c | 50 __acquires(&journal->j_state_lock) in __jbd2_log_wait_for_space() 51 __releases(&journal->j_state_lock) in __jbd2_log_wait_for_space() 72 write_lock(&journal->j_state_lock); in __jbd2_log_wait_for_space() 77 spin_lock(&journal->j_list_lock); in __jbd2_log_wait_for_space() 91 jbd2_log_do_checkpoint(journal); in __jbd2_log_wait_for_space() 114 journal->j_devname); in __jbd2_log_wait_for_space() 141 journal->j_chkpt_bhs[i] = NULL; in __flush_batch() 179 spin_lock(&journal->j_list_lock); in jbd2_log_do_checkpoint() 322 if (is_journal_aborted(journal)) in jbd2_cleanup_journal_tail() 419 spin_lock(&journal->j_list_lock); in jbd2_journal_shrink_checkpoint_list() [all …]
|
| H A D | commit.c | 126 if (is_journal_aborted(journal)) in journal_submit_commit_record() 398 journal->j_tail_sequence, in jbd2_journal_commit_transaction() 399 journal->j_tail, 0); in jbd2_journal_commit_transaction() 438 journal->j_fc_off = 0; in jbd2_journal_commit_transaction() 742 err, journal->j_devname); in jbd2_journal_commit_transaction() 761 freed += journal->j_last - journal->j_first; in jbd2_journal_commit_transaction() 776 (journal->j_fs_dev != journal->j_dev) && in jbd2_journal_commit_transaction() 1121 journal->j_commit_callback(journal, commit_transaction); in jbd2_journal_commit_transaction() 1123 journal->j_fc_cleanup_callback(journal, 1, commit_transaction->t_tid); in jbd2_journal_commit_transaction() 1127 journal->j_commit_sequence, journal->j_tail_sequence); in jbd2_journal_commit_transaction() [all …]
|
| H A D | transaction.c | 272 if (jbd2_log_space_left(journal) < journal->j_max_transaction_buffers) { in add_transaction_credits() 367 (journal->j_errno != 0 && !(journal->j_flags & JBD2_ACK_ERR))) { in start_this_handle() 473 if (!journal) in jbd2__journal_start() 644 journal_t *journal; in jbd2_journal_extend() local 763 journal_t *journal; in jbd2__journal_restart() local 952 journal_t *journal; in do_get_write_access() local 1215 journal_t *journal; in jbd2_journal_get_write_access() local 1269 journal_t *journal; in jbd2_journal_get_create_access() local 1484 journal_t *journal; in jbd2_journal_dirty_metadata() local 1656 journal_t *journal; in jbd2_journal_forget() local [all …]
|
| H A D | revoke.c | 151 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash() 166 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record() 276 journal->j_revoke = journal->j_revoke_table[1]; in jbd2_journal_init_revoke() 292 journal->j_revoke = NULL; in jbd2_journal_destroy_revoke() 330 journal_t *journal; in jbd2_journal_revoke() local 344 bdev = journal->j_fs_dev; in jbd2_journal_revoke() 517 if (journal->j_revoke == journal->j_revoke_table[0]) in jbd2_journal_switch_revoke_table() 518 journal->j_revoke = journal->j_revoke_table[1]; in jbd2_journal_switch_revoke_table() 520 journal->j_revoke = journal->j_revoke_table[0]; in jbd2_journal_switch_revoke_table() 545 revoke = journal->j_revoke == journal->j_revoke_table[0] ? in jbd2_journal_write_revoke_records() [all …]
|
| H A D | recovery.c | 95 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead() 147 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in jread() 230 var -= ((journal)->j_last - (journal)->j_first); \ 254 err = journal->j_fc_replay_callback(journal, bh, pass, in fc_do_one_pass() 323 journal->j_transaction_sequence, journal->j_head); in jbd2_journal_recover() 327 if (journal->j_revoke != journal->j_revoke_table[0] && in jbd2_journal_recover() 328 journal->j_revoke != journal->j_revoke_table[1]) { in jbd2_journal_recover() 330 journal->j_revoke = journal->j_revoke_table[1]; in jbd2_journal_recover() 373 journal->j_head = journal->j_first; in jbd2_journal_skip_recovery() 386 journal->j_tail = 0; in jbd2_journal_skip_recovery() [all …]
|
| /linux-6.15/fs/bcachefs/ |
| H A D | journal_reclaim.h | 19 void bch2_journal_set_watermark(struct journal *); 20 void bch2_journal_space_available(struct journal *); 28 journal_seq_pin(struct journal *j, u64 seq) in journal_seq_pin() 35 void bch2_journal_reclaim_fast(struct journal *); 36 bool __bch2_journal_pin_put(struct journal *, u64); 37 void bch2_journal_pin_put(struct journal *, u64); 51 void bch2_journal_pin_copy(struct journal *, 66 void bch2_journal_do_discards(struct journal *); 67 int bch2_journal_reclaim(struct journal *); 69 void bch2_journal_reclaim_stop(struct journal *); [all …]
|
| H A D | journal.h | 279 bool bch2_journal_entry_close(struct journal *); 280 void bch2_journal_do_writes(struct journal *); 425 int bch2_journal_flush(struct journal *); 427 int bch2_journal_meta(struct journal *); 429 void bch2_journal_halt(struct journal *); 430 void bch2_journal_halt_locked(struct journal *); 440 void bch2_journal_unblock(struct journal *); 441 void bch2_journal_block(struct journal *); 454 void bch2_fs_journal_stop(struct journal *); 460 void bch2_fs_journal_exit(struct journal *); [all …]
|
| H A D | journal_sb.c | 22 struct bch_sb_field_journal *journal = field_to_type(f, journal); in bch2_sb_journal_validate() local 29 nr = bch2_nr_journal_buckets(journal); in bch2_sb_journal_validate() 38 b[i] = le64_to_cpu(journal->buckets[i]); in bch2_sb_journal_validate() 74 struct bch_sb_field_journal *journal = field_to_type(f, journal); in bch2_sb_journal_to_text() local 75 unsigned i, nr = bch2_nr_journal_buckets(journal); in bch2_sb_journal_to_text() 121 b[i].start = le64_to_cpu(journal->d[i].start); in bch2_sb_journal_v2_validate() 126 le64_to_cpu(journal->d[i].start), in bch2_sb_journal_v2_validate() 127 le64_to_cpu(journal->d[i].nr)); in bch2_sb_journal_v2_validate() 131 sum += le64_to_cpu(journal->d[i].nr); in bch2_sb_journal_v2_validate() 181 le64_to_cpu(journal->d[i].start), in bch2_sb_journal_v2_to_text() [all …]
|
| H A D | journal_reclaim.c | 86 struct journal_device *ja = &ca->journal; in journal_dev_space_available() 151 if (!ca->journal.nr || in __journal_space_available() 195 struct journal_device *ja = &ca->journal; in bch2_journal_space_available() 297 struct journal_device *ja = &ca->journal; in bch2_journal_do_discards() 389 void bch2_journal_pin_drop(struct journal *j, in bch2_journal_pin_drop() 437 void bch2_journal_pin_copy(struct journal *j, in bch2_journal_pin_copy() 519 journal_get_next_pin(struct journal *j, in journal_get_next_pin() 629 struct journal_device *ja = &ca->journal; in journal_seq_to_flush() 750 int bch2_journal_reclaim(struct journal *j) in bch2_journal_reclaim() 757 struct journal *j = arg; in bch2_journal_reclaim_thread() [all …]
|
| H A D | journal.c | 105 journal_seq_to_buf(struct journal *j, u64 seq) in journal_seq_to_buf() 334 void bch2_journal_halt(struct journal *j) in bch2_journal_halt() 537 struct journal *j = container_of(work, struct journal, write_work.work); in journal_write_work() 925 int bch2_journal_flush(struct journal *j) in bch2_journal_flush() 989 int bch2_journal_meta(struct journal *j) in bch2_journal_meta() 1165 bch2_journal_block(&c->journal); in bch2_set_nr_journal_buckets_iter() 1198 spin_lock(&c->journal.lock); in bch2_set_nr_journal_buckets_iter() 1214 spin_unlock(&c->journal.lock); in bch2_set_nr_journal_buckets_iter() 1217 bch2_journal_unblock(&c->journal); in bch2_set_nr_journal_buckets_iter() 1330 if (ca->journal.nr) in bch2_fs_journal_alloc() [all …]
|
| H A D | btree_key_cache.c | 416 struct journal *j = &c->journal; in btree_key_cache_flush_pos() 447 trans->journal_res.seq = ck->journal.seq; in btree_key_cache_flush_pos() 455 if (ck->journal.seq == journal_last_seq(j)) in btree_key_cache_flush_pos() 458 if (ck->journal.seq != journal_last_seq(j) || in btree_key_cache_flush_pos() 487 bch2_journal_pin_drop(j, &ck->journal); in btree_key_cache_flush_pos() 540 if (ck->journal.seq != seq || in bch2_btree_key_cache_journal_flush() 547 bch2_journal_pin_update(&c->journal, ck->seq, &ck->journal, in bch2_btree_key_cache_journal_flush() 599 !journal_pin_active(&ck->journal)) { in bch2_btree_insert_key_cached() 606 journal_reclaim_kick(&c->journal); in bch2_btree_insert_key_cached() 624 bch2_journal_pin_drop(&c->journal, &ck->journal); in bch2_btree_key_cache_drop() [all …]
|
| /linux-6.15/drivers/md/bcache/ |
| H A D | journal.c | 298 struct journal *j = &c->journal; in bch_journal_mark() 436 spin_lock(&c->journal.lock); in btree_flush_write() 449 mask = c->journal.pin.mask; in btree_flush_write() 632 struct journal *j = &c->journal; in free_journal_buckets() 673 if (c->journal.blocks_free) in journal_reclaim() 749 __releases(c->journal.lock) 790 bio = &ca->journal.bio; 808 ca->journal.seq[ca->journal.cur_idx] = w->data->seq; 910 journal.work); in journal_write_work() 912 if (c->journal.cur->dirty) in journal_write_work() [all …]
|
| H A D | journal.h | 104 struct journal { struct 163 (fifo_idx(&(c)->journal.pin, (l)) > fifo_idx(&(c)->journal.pin, (r))) 178 void bch_journal_next(struct journal *j); 186 void bch_journal_space_reserve(struct journal *j);
|
| /linux-6.15/fs/ocfs2/ |
| H A D | journal.c | 318 journal = osb->journal; in ocfs2_commit_cache() 355 journal_t *journal = osb->journal->j_journal; in ocfs2_start_trans() local 397 struct ocfs2_journal *journal = osb->journal; in ocfs2_commit_trans() local 857 journal_t *journal = osb->journal->j_journal; in ocfs2_set_journal_params() local 887 osb->journal = journal; in ocfs2_journal_alloc() 921 struct ocfs2_journal *journal = osb->journal; in ocfs2_journal_init() local 1025 struct ocfs2_journal *journal = osb->journal; in ocfs2_journal_toggle_dirty() local 1067 journal = osb->journal; in ocfs2_journal_shutdown() 1068 if (!journal) in ocfs2_journal_shutdown() 1436 struct ocfs2_journal *journal = osb->journal; in ocfs2_complete_mount_recovery() local [all …]
|
| H A D | journal.h | 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, 208 wait_event(osb->journal->j_checkpointed, in ocfs2_checkpoint_inode() [all …]
|
| /linux-6.15/include/linux/ |
| H A D | jbd2.h | 1675 return journal->j_flags & JBD2_ABORT; in is_journal_aborted() 1732 jbd2_has_feature_csum3(journal); in jbd2_journal_has_csum_v2or3() 1748 long free = journal->j_free - 32; in jbd2_log_space_left() 1750 if (journal->j_committing_transaction) { in jbd2_log_space_left() 1751 free -= atomic_read(&journal-> in jbd2_log_space_left() 1780 read_lock(&journal->j_state_lock); in jbd2_get_latest_transaction() 1781 tid = journal->j_commit_request; in jbd2_get_latest_transaction() 1782 if (journal->j_running_transaction) in jbd2_get_latest_transaction() 1784 read_unlock(&journal->j_state_lock); in jbd2_get_latest_transaction() 1790 journal_t *journal; in jbd2_handle_buffer_credits() local [all …]
|
| /linux-6.15/include/trace/events/ |
| H A D | jbd2.h | 16 TP_PROTO(journal_t *journal, int result), 18 TP_ARGS(journal, result), 38 TP_ARGS(journal, commit_transaction), 61 TP_ARGS(journal, commit_transaction) 68 TP_ARGS(journal, commit_transaction) 75 TP_ARGS(journal, commit_transaction) 82 TP_ARGS(journal, commit_transaction) 89 TP_ARGS(journal, commit_transaction) 95 TP_ARGS(journal, commit_transaction), 360 TP_ARGS(journal, write_flags), [all …]
|
| /linux-6.15/Documentation/filesystems/ext4/ |
| H A D | journal.rst | 26 option to control journal behavior. If ``data=journal``, all data and 43 journal inode are replicated in the ext4 superblock. The journal itself 59 Generally speaking, the journal has this format: 135 The journal block type can be any one of: 178 - Static information describing the journal. 190 - Total number of blocks in this journal. 236 - Number of file systems sharing this journal. 266 up-to-date when the journal is empty. 314 - This journal uses v2 of the checksum on-disk format. Each journal 317 journal. (JBD2_FEATURE_INCOMPAT_CSUM_V2) [all …]
|
| /linux-6.15/Documentation/admin-guide/device-mapper/ |
| H A D | dm-integrity.rst | 13 writes sector data and integrity tags into a journal, commits the journal 75 D - direct writes (without journal) 124 The journal watermark in percents. When the size of the journal 163 situation, you can encrypt the journal. 202 copy sectors from one journal section to another journal section 248 * the number of journal sections 259 - journal area contains the bitmap of dirty 263 * journal 268 - every journal entry contains: 281 numbers in the journal. [all …]
|
| /linux-6.15/Documentation/filesystems/ |
| H A D | journalling.rst | 12 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 70 jbd2_journal_destroy() to clean up your in-core journal object. 72 Unfortunately there a couple of ways the journal layer can cause a 107 journal commit callback for this purpose. [all …]
|