Home
last modified time | relevance | path

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

12

/fs/jbd/
Djournal.c90 static void __journal_abort_soft (journal_t *journal, int errno);
91 static const char *journal_dev_name(journal_t *journal, char *buffer);
122 journal_t *journal = arg; in kjournald() local
129 setup_timer(&journal->j_commit_timer, commit_timeout, in kjournald()
135 journal->j_task = current; in kjournald()
136 wake_up(&journal->j_wait_done_commit); in kjournald()
139 journal->j_commit_interval / HZ); in kjournald()
144 spin_lock(&journal->j_state_lock); in kjournald()
147 if (journal->j_flags & JFS_UNMOUNT) in kjournald()
151 journal->j_commit_sequence, journal->j_commit_request); in kjournald()
[all …]
Dcheckpoint.c122 void __log_wait_for_space(journal_t *journal) in __log_wait_for_space() argument
125 assert_spin_locked(&journal->j_state_lock); in __log_wait_for_space()
127 nblocks = jbd_space_needed(journal); in __log_wait_for_space()
128 while (__log_space_left(journal) < nblocks) { in __log_wait_for_space()
129 if (journal->j_flags & JFS_ABORT) in __log_wait_for_space()
131 spin_unlock(&journal->j_state_lock); in __log_wait_for_space()
132 mutex_lock(&journal->j_checkpoint_mutex); in __log_wait_for_space()
145 spin_lock(&journal->j_state_lock); in __log_wait_for_space()
146 spin_lock(&journal->j_list_lock); in __log_wait_for_space()
147 nblocks = jbd_space_needed(journal); in __log_wait_for_space()
[all …]
Dcommit.c105 static int inverted_lock(journal_t *journal, struct buffer_head *bh) in inverted_lock() argument
108 spin_unlock(&journal->j_list_lock); in inverted_lock()
122 static int journal_write_commit_record(journal_t *journal, in journal_write_commit_record() argument
130 if (is_journal_aborted(journal)) in journal_write_commit_record()
133 descriptor = journal_get_descriptor_buffer(journal); in journal_write_commit_record()
147 if (journal->j_flags & JFS_BARRIER) in journal_write_commit_record()
173 static int journal_submit_data_buffers(journal_t *journal, in journal_submit_data_buffers() argument
181 struct buffer_head **wbuf = journal->j_wbuf; in journal_submit_data_buffers()
194 spin_lock(&journal->j_list_lock); in journal_submit_data_buffers()
212 spin_unlock(&journal->j_list_lock); in journal_submit_data_buffers()
[all …]
Drevoke.c133 static inline int hash(journal_t *journal, unsigned int block) in hash() argument
135 struct jbd_revoke_table_s *table = journal->j_revoke; in hash()
143 static int insert_revoke_hash(journal_t *journal, unsigned int blocknr, in insert_revoke_hash() argument
156 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash()
157 spin_lock(&journal->j_revoke_lock); in insert_revoke_hash()
159 spin_unlock(&journal->j_revoke_lock); in insert_revoke_hash()
172 static struct jbd_revoke_record_s *find_revoke_record(journal_t *journal, in find_revoke_record() argument
178 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record()
180 spin_lock(&journal->j_revoke_lock); in find_revoke_record()
184 spin_unlock(&journal->j_revoke_lock); in find_revoke_record()
[all …]
Dtransaction.c50 get_transaction(journal_t *journal, transaction_t *transaction) in get_transaction() argument
52 transaction->t_journal = journal; in get_transaction()
55 transaction->t_tid = journal->j_transaction_sequence++; in get_transaction()
56 transaction->t_expires = jiffies + journal->j_commit_interval; in get_transaction()
60 journal->j_commit_timer.expires = in get_transaction()
62 add_timer(&journal->j_commit_timer); in get_transaction()
64 J_ASSERT(journal->j_running_transaction == NULL); in get_transaction()
65 journal->j_running_transaction = transaction; in get_transaction()
85 static int start_this_handle(journal_t *journal, handle_t *handle) in start_this_handle() argument
93 if (nblocks > journal->j_max_transaction_buffers) { in start_this_handle()
[all …]
Drecovery.c41 static int do_one_pass(journal_t *journal,
69 static int do_readahead(journal_t *journal, unsigned int start) in do_readahead() argument
79 max = start + (128 * 1024 / journal->j_blocksize); in do_readahead()
80 if (max > journal->j_maxlen) in do_readahead()
81 max = journal->j_maxlen; in do_readahead()
89 err = journal_bmap(journal, next, &blocknr); in do_readahead()
97 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead()
131 static int jread(struct buffer_head **bhp, journal_t *journal, in jread() argument
140 if (offset >= journal->j_maxlen) { in jread()
145 err = journal_bmap(journal, offset, &blocknr); in jread()
[all …]
/fs/jbd2/
Djournal.c97 static void __journal_abort_soft (journal_t *journal, int errno);
129 journal_t *journal = arg; in kjournald2() local
136 setup_timer(&journal->j_commit_timer, commit_timeout, in kjournald2()
142 journal->j_task = current; in kjournald2()
143 wake_up(&journal->j_wait_done_commit); in kjournald2()
148 write_lock(&journal->j_state_lock); in kjournald2()
151 if (journal->j_flags & JBD2_UNMOUNT) in kjournald2()
155 journal->j_commit_sequence, journal->j_commit_request); in kjournald2()
157 if (journal->j_commit_sequence != journal->j_commit_request) { in kjournald2()
159 write_unlock(&journal->j_state_lock); in kjournald2()
[all …]
Dcommit.c96 static int journal_submit_commit_record(journal_t *journal, in journal_submit_commit_record() argument
109 if (is_journal_aborted(journal)) in journal_submit_commit_record()
112 descriptor = jbd2_journal_get_descriptor_buffer(journal); in journal_submit_commit_record()
125 if (JBD2_HAS_COMPAT_FEATURE(journal, in journal_submit_commit_record()
138 if (journal->j_flags & JBD2_BARRIER && in journal_submit_commit_record()
139 !JBD2_HAS_INCOMPAT_FEATURE(journal, in journal_submit_commit_record()
153 static int journal_wait_on_commit_record(journal_t *journal, in journal_wait_on_commit_record() argument
197 static int journal_submit_data_buffers(journal_t *journal, in journal_submit_data_buffers() argument
204 spin_lock(&journal->j_list_lock); in journal_submit_data_buffers()
208 spin_unlock(&journal->j_list_lock); in journal_submit_data_buffers()
[all …]
Dcheckpoint.c118 void __jbd2_log_wait_for_space(journal_t *journal) in __jbd2_log_wait_for_space() argument
123 nblocks = jbd_space_needed(journal); in __jbd2_log_wait_for_space()
124 while (__jbd2_log_space_left(journal) < nblocks) { in __jbd2_log_wait_for_space()
125 if (journal->j_flags & JBD2_ABORT) in __jbd2_log_wait_for_space()
127 write_unlock(&journal->j_state_lock); in __jbd2_log_wait_for_space()
128 mutex_lock(&journal->j_checkpoint_mutex); in __jbd2_log_wait_for_space()
141 write_lock(&journal->j_state_lock); in __jbd2_log_wait_for_space()
142 spin_lock(&journal->j_list_lock); in __jbd2_log_wait_for_space()
143 nblocks = jbd_space_needed(journal); in __jbd2_log_wait_for_space()
144 space_left = __jbd2_log_space_left(journal); in __jbd2_log_wait_for_space()
[all …]
Drevoke.c133 static inline int hash(journal_t *journal, unsigned long long block) in hash() argument
135 struct jbd2_revoke_table_s *table = journal->j_revoke; in hash()
144 static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr, in insert_revoke_hash() argument
157 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash()
158 spin_lock(&journal->j_revoke_lock); in insert_revoke_hash()
160 spin_unlock(&journal->j_revoke_lock); in insert_revoke_hash()
173 static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal, in find_revoke_record() argument
179 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record()
181 spin_lock(&journal->j_revoke_lock); in find_revoke_record()
185 spin_unlock(&journal->j_revoke_lock); in find_revoke_record()
[all …]
Dtransaction.c81 jbd2_get_transaction(journal_t *journal, transaction_t *transaction) 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()
96 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires); in jbd2_get_transaction()
97 add_timer(&journal->j_commit_timer); in jbd2_get_transaction()
99 J_ASSERT(journal->j_running_transaction == NULL); in jbd2_get_transaction()
100 journal->j_running_transaction = transaction; in jbd2_get_transaction()
147 static int start_this_handle(journal_t *journal, handle_t *handle, in start_this_handle() argument
156 if (nblocks > journal->j_max_transaction_buffers) { in start_this_handle()
[all …]
Drecovery.c42 static int do_one_pass(journal_t *journal,
70 static int do_readahead(journal_t *journal, unsigned int start) in do_readahead() argument
80 max = start + (128 * 1024 / journal->j_blocksize); in do_readahead()
81 if (max > journal->j_maxlen) in do_readahead()
82 max = journal->j_maxlen; in do_readahead()
90 err = jbd2_journal_bmap(journal, next, &blocknr); in do_readahead()
98 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead()
132 static int jread(struct buffer_head **bhp, journal_t *journal, in jread() argument
141 if (offset >= journal->j_maxlen) { in jread()
146 err = jbd2_journal_bmap(journal, offset, &blocknr); in jread()
[all …]
/fs/reiserfs/
Djournal.c101 struct reiserfs_journal *journal);
120 struct reiserfs_journal *journal = SB_JOURNAL(sb); in init_journal_hash() local
121 memset(journal->j_hash_table, 0, in init_journal_hash()
161 struct reiserfs_journal *journal = SB_JOURNAL(sb); in get_bitmap_node() local
163 struct list_head *entry = journal->j_bitmap_nodes.next; in get_bitmap_node()
165 journal->j_used_bitmap_nodes++; in get_bitmap_node()
168 if (entry != &journal->j_bitmap_nodes) { in get_bitmap_node()
172 journal->j_free_bitmap_nodes--; in get_bitmap_node()
185 struct reiserfs_journal *journal = SB_JOURNAL(sb); in free_bitmap_node() local
186 journal->j_used_bitmap_nodes--; in free_bitmap_node()
[all …]
Dsuper.c610 struct reiserfs_journal *journal = SB_JOURNAL(s); in reiserfs_show_options() local
650 if (journal->j_max_commit_age != journal->j_default_max_commit_age) in reiserfs_show_options()
651 seq_printf(seq, ",commit=%d", journal->j_max_commit_age); in reiserfs_show_options()
1271 struct reiserfs_journal *journal = SB_JOURNAL(s); in reiserfs_remount() local
1330 journal->j_max_commit_age = commit_max_age; in reiserfs_remount()
1331 journal->j_max_trans_age = commit_max_age; in reiserfs_remount()
1334 journal->j_max_commit_age = journal->j_default_max_commit_age; in reiserfs_remount()
1335 journal->j_max_trans_age = JOURNAL_MAX_TRANS_AGE; in reiserfs_remount()
1382 if (reiserfs_is_journal_aborted(journal)) { in reiserfs_remount()
1383 err = journal->j_errno; in reiserfs_remount()
/fs/ocfs2/
Djournal.c73 static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal,
164 ocfs2_queue_recovery_completion(osb->journal, i, NULL, in ocfs2_queue_replay_slots()
304 struct ocfs2_journal *journal = NULL; in ocfs2_commit_cache() local
306 journal = osb->journal; in ocfs2_commit_cache()
309 down_write(&journal->j_trans_barrier); in ocfs2_commit_cache()
311 flushed = atomic_read(&journal->j_num_trans); in ocfs2_commit_cache()
314 up_write(&journal->j_trans_barrier); in ocfs2_commit_cache()
318 jbd2_journal_lock_updates(journal->j_journal); in ocfs2_commit_cache()
319 status = jbd2_journal_flush(journal->j_journal); in ocfs2_commit_cache()
320 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.c296 "Journal", osb->journal->j_state, in ocfs2_osb_dump()
297 osb->journal->j_trans_id, in ocfs2_osb_dump()
298 atomic_read(&osb->journal->j_num_trans)); in ocfs2_osb_dump()
420 if (jbd2_journal_start_commit(OCFS2_SB(sb)->journal->j_journal, in ocfs2_sync_fs()
423 jbd2_log_wait_commit(OCFS2_SB(sb)->journal->j_journal, in ocfs2_sync_fs()
2051 jbd2_journal_check_used_features(osb->journal->j_journal, 0, 0, in ocfs2_journal_addressable()
2072 struct ocfs2_journal *journal; in ocfs2_initialize_super() local
2253 journal = kzalloc(sizeof(struct ocfs2_journal), GFP_KERNEL); in ocfs2_initialize_super()
2254 if (!journal) { in ocfs2_initialize_super()
2259 osb->journal = journal; in ocfs2_initialize_super()
[all …]
/fs/ext3/
Dsuper.c75 journal_t *journal; in ext3_journal_start_sb() local
83 journal = EXT3_SB(sb)->s_journal; in ext3_journal_start_sb()
84 if (is_journal_aborted(journal)) { in ext3_journal_start_sb()
90 return journal_start(journal, nblocks); in ext3_journal_start_sb()
179 journal_t *journal = EXT3_SB(sb)->s_journal; in ext3_handle_error() local
182 if (journal) in ext3_handle_error()
183 journal_abort(journal, -EIO); in ext3_handle_error()
735 journal_t *journal = EXT3_SB(sb)->s_journal; in bdev_try_to_free_page() local
740 if (journal) in bdev_try_to_free_page()
741 return journal_try_to_free_buffers(journal, page, in bdev_try_to_free_page()
[all …]
Dfsync.c45 journal_t *journal = EXT3_SB(inode->i_sb)->s_journal; in ext3_sync_file() local
85 !journal_trans_will_send_data_barrier(journal, commit_tid)) in ext3_sync_file()
87 log_start_commit(journal, commit_tid); in ext3_sync_file()
88 ret = log_wait_commit(journal, commit_tid); in ext3_sync_file()
Dinode.c224 journal_t *journal = EXT3_SB(inode->i_sb)->s_journal; in ext3_evict_inode() local
226 log_start_commit(journal, commit_tid); in ext3_evict_inode()
227 log_wait_commit(journal, commit_tid); in ext3_evict_inode()
1505 journal_t *journal; in ext3_bmap() local
1528 journal = EXT3_JOURNAL(inode); in ext3_bmap()
1529 journal_lock_updates(journal); in ext3_bmap()
1530 err = journal_flush(journal); in ext3_bmap()
1531 journal_unlock_updates(journal); in ext3_bmap()
1826 journal_t *journal = EXT3_JOURNAL(page->mapping->host); in ext3_invalidatepage() local
1836 journal_invalidatepage(journal, page, offset); in ext3_invalidatepage()
[all …]
DKconfig11 crash. The journal keeps track of any changes that were being made
15 Other than adding the journal to the file system, the on-disk format
21 To add a journal on an existing ext2 file system or change the
36 The journal mode options for ext3 have different tradeoffs
/fs/ext4/
Dfsync.c212 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_sync_file() local
233 if (!journal) { in ext4_sync_file()
260 if (journal->j_flags & JBD2_BARRIER && in ext4_sync_file()
261 !jbd2_trans_will_send_data_barrier(journal, commit_tid)) in ext4_sync_file()
263 jbd2_log_start_commit(journal, commit_tid); in ext4_sync_file()
264 ret = jbd2_log_wait_commit(journal, commit_tid); in ext4_sync_file()
Dsuper.c300 journal_t *journal; in ext4_journal_start_sb() local
307 journal = EXT4_SB(sb)->s_journal; in ext4_journal_start_sb()
320 if (!journal) in ext4_journal_start_sb()
327 if (is_journal_aborted(journal)) { in ext4_journal_start_sb()
331 return jbd2_journal_start(journal, nblocks); in ext4_journal_start_sb()
435 static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) in ext4_journal_commit_callback() argument
437 struct super_block *sb = journal->j_private; in ext4_journal_commit_callback()
439 int error = is_journal_aborted(journal); in ext4_journal_commit_callback()
476 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_handle_error() local
479 if (journal) in ext4_handle_error()
[all …]
Dinode.c149 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_evict_inode() local
152 jbd2_log_start_commit(journal, commit_tid); in ext4_evict_inode()
153 jbd2_log_wait_commit(journal, commit_tid); in ext4_evict_inode()
2648 journal_t *journal; in ext4_bmap() local
2682 journal = EXT4_JOURNAL(inode); in ext4_bmap()
2683 jbd2_journal_lock_updates(journal); in ext4_bmap()
2684 err = jbd2_journal_flush(journal); in ext4_bmap()
2685 jbd2_journal_unlock_updates(journal); in ext4_bmap()
2729 journal_t *journal = EXT4_JOURNAL(page->mapping->host); in ext4_invalidatepage() local
2744 if (journal) in ext4_invalidatepage()
[all …]
Dext4_jbd2.h310 static inline int ext4_journal_force_commit(journal_t *journal) in ext4_journal_force_commit() argument
312 if (journal) in ext4_journal_force_commit()
313 return jbd2_journal_force_commit(journal); in ext4_journal_force_commit()

12