Home
last modified time | relevance | path

Searched refs:journal (Results 1 – 25 of 43) 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()
182 static int journal_submit_data_buffers(journal_t *journal, in journal_submit_data_buffers() argument
190 struct buffer_head **wbuf = journal->j_wbuf; in journal_submit_data_buffers()
203 spin_lock(&journal->j_list_lock); in journal_submit_data_buffers()
221 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.c103 static void __journal_abort_soft (journal_t *journal, int errno);
191 journal_t *journal = arg; in kjournald2() local
198 setup_timer(&journal->j_commit_timer, commit_timeout, in kjournald2()
204 journal->j_task = current; in kjournald2()
205 wake_up(&journal->j_wait_done_commit); in kjournald2()
210 write_lock(&journal->j_state_lock); in kjournald2()
213 if (journal->j_flags & JBD2_UNMOUNT) in kjournald2()
217 journal->j_commit_sequence, journal->j_commit_request); in kjournald2()
219 if (journal->j_commit_sequence != journal->j_commit_request) { in kjournald2()
221 write_unlock(&journal->j_state_lock); in kjournald2()
[all …]
Dcommit.c119 static int journal_submit_commit_record(journal_t *journal, in journal_submit_commit_record() argument
131 if (is_journal_aborted(journal)) in journal_submit_commit_record()
134 bh = jbd2_journal_get_descriptor_buffer(journal); in journal_submit_commit_record()
145 if (JBD2_HAS_COMPAT_FEATURE(journal, in journal_submit_commit_record()
151 jbd2_commit_block_csum_set(journal, bh); in journal_submit_commit_record()
159 if (journal->j_flags & JBD2_BARRIER && in journal_submit_commit_record()
160 !JBD2_HAS_INCOMPAT_FEATURE(journal, in journal_submit_commit_record()
174 static int journal_wait_on_commit_record(journal_t *journal, in journal_wait_on_commit_record() argument
217 static int journal_submit_data_buffers(journal_t *journal, in journal_submit_data_buffers() argument
224 spin_lock(&journal->j_list_lock); in journal_submit_data_buffers()
[all …]
Dtransaction.c83 jbd2_get_transaction(journal_t *journal, transaction_t *transaction) in jbd2_get_transaction() argument
85 transaction->t_journal = journal; in jbd2_get_transaction()
88 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction()
89 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction()
93 atomic_read(&journal->j_reserved_credits)); in jbd2_get_transaction()
99 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires); in jbd2_get_transaction()
100 add_timer(&journal->j_commit_timer); in jbd2_get_transaction()
102 J_ASSERT(journal->j_running_transaction == NULL); in jbd2_get_transaction()
103 journal->j_running_transaction = transaction; in jbd2_get_transaction()
149 static void wait_transaction_locked(journal_t *journal) in wait_transaction_locked() argument
[all …]
Dcheckpoint.c111 void __jbd2_log_wait_for_space(journal_t *journal) in __jbd2_log_wait_for_space() argument
116 nblocks = jbd2_space_needed(journal); in __jbd2_log_wait_for_space()
117 while (jbd2_log_space_left(journal) < nblocks) { in __jbd2_log_wait_for_space()
118 write_unlock(&journal->j_state_lock); in __jbd2_log_wait_for_space()
119 mutex_lock(&journal->j_checkpoint_mutex); in __jbd2_log_wait_for_space()
132 write_lock(&journal->j_state_lock); in __jbd2_log_wait_for_space()
133 if (journal->j_flags & JBD2_ABORT) { in __jbd2_log_wait_for_space()
134 mutex_unlock(&journal->j_checkpoint_mutex); in __jbd2_log_wait_for_space()
137 spin_lock(&journal->j_list_lock); in __jbd2_log_wait_for_space()
138 nblocks = jbd2_space_needed(journal); in __jbd2_log_wait_for_space()
[all …]
Drevoke.c134 static inline int hash(journal_t *journal, unsigned long long block) in hash() argument
136 return hash_64(block, journal->j_revoke->hash_shift); in hash()
139 static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr, in insert_revoke_hash() argument
152 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash()
153 spin_lock(&journal->j_revoke_lock); in insert_revoke_hash()
155 spin_unlock(&journal->j_revoke_lock); in insert_revoke_hash()
168 static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal, in find_revoke_record() argument
174 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record()
176 spin_lock(&journal->j_revoke_lock); in find_revoke_record()
180 spin_unlock(&journal->j_revoke_lock); in find_revoke_record()
[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 …]
/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()
2059 jbd2_journal_check_used_features(osb->journal->j_journal, 0, 0, in ocfs2_journal_addressable()
2080 struct ocfs2_journal *journal; in ocfs2_initialize_super() local
2261 journal = kzalloc(sizeof(struct ocfs2_journal), GFP_KERNEL); in ocfs2_initialize_super()
2262 if (!journal) { in ocfs2_initialize_super()
2267 osb->journal = journal; in ocfs2_initialize_super()
[all …]
/fs/ext3/
Dsuper.c70 journal_t *journal; in ext3_journal_start_sb() local
78 journal = EXT3_SB(sb)->s_journal; in ext3_journal_start_sb()
79 if (is_journal_aborted(journal)) { in ext3_journal_start_sb()
85 return journal_start(journal, nblocks); in ext3_journal_start_sb()
168 journal_t *journal = EXT3_SB(sb)->s_journal; in ext3_handle_error() local
171 if (journal) in ext3_handle_error()
172 journal_abort(journal, -EIO); in ext3_handle_error()
728 journal_t *journal = EXT3_SB(sb)->s_journal; in bdev_try_to_free_page() local
733 if (journal) in bdev_try_to_free_page()
734 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.c225 journal_t *journal = EXT3_SB(inode->i_sb)->s_journal; in ext3_evict_inode() local
227 log_start_commit(journal, commit_tid); in ext3_evict_inode()
228 log_wait_commit(journal, commit_tid); in ext3_evict_inode()
1509 journal_t *journal; in ext3_bmap() local
1532 journal = EXT3_JOURNAL(inode); in ext3_bmap()
1533 journal_lock_updates(journal); in ext3_bmap()
1534 err = journal_flush(journal); in ext3_bmap()
1535 journal_unlock_updates(journal); in ext3_bmap()
1831 journal_t *journal = EXT3_JOURNAL(page->mapping->host); in ext3_invalidatepage() local
1841 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.c92 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_sync_file() local
109 if (!journal) { in ext4_sync_file()
139 if (journal->j_flags & JBD2_BARRIER && in ext4_sync_file()
140 !jbd2_trans_will_send_data_barrier(journal, commit_tid)) in ext4_sync_file()
142 ret = jbd2_complete_transaction(journal, commit_tid); in ext4_sync_file()
Dext4_jbd2.c43 journal_t *journal; in ext4_journal_check_start() local
49 journal = EXT4_SB(sb)->s_journal; in ext4_journal_check_start()
55 if (journal && is_journal_aborted(journal)) { in ext4_journal_check_start()
65 journal_t *journal; in __ext4_journal_start_sb() local
73 journal = EXT4_SB(sb)->s_journal; in __ext4_journal_start_sb()
74 if (!journal) in __ext4_journal_start_sb()
76 return jbd2__journal_start(journal, blocks, rsv_blocks, GFP_NOFS, in __ext4_journal_start_sb()
Dsuper.c353 static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) in ext4_journal_commit_callback() argument
355 struct super_block *sb = journal->j_private; in ext4_journal_commit_callback()
357 int error = is_journal_aborted(journal); in ext4_journal_commit_callback()
394 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_handle_error() local
397 if (journal) in ext4_handle_error()
398 jbd2_journal_abort(journal, -EIO); in ext4_handle_error()
1044 journal_t *journal = EXT4_SB(sb)->s_journal; in bdev_try_to_free_page() local
1049 if (journal) in bdev_try_to_free_page()
1050 return jbd2_journal_try_to_free_buffers(journal, page, in bdev_try_to_free_page()
4325 static void ext4_init_journal_params(struct super_block *sb, journal_t *journal) in ext4_init_journal_params() argument
[all …]
Dinode.c213 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_evict_inode() local
216 jbd2_complete_transaction(journal, commit_tid); in ext4_evict_inode()
2868 journal_t *journal; in ext4_bmap() local
2908 journal = EXT4_JOURNAL(inode); in ext4_bmap()
2909 jbd2_journal_lock_updates(journal); in ext4_bmap()
2910 err = jbd2_journal_flush(journal); in ext4_bmap()
2911 jbd2_journal_unlock_updates(journal); in ext4_bmap()
2964 journal_t *journal = EXT4_JOURNAL(page->mapping->host); in __ext4_journalled_invalidatepage() local
2974 return jbd2_journal_invalidatepage(journal, page, offset, length); in __ext4_journalled_invalidatepage()
2987 journal_t *journal = EXT4_JOURNAL(page->mapping->host); in ext4_releasepage() local
[all …]
Dext4_jbd2.h357 static inline int ext4_journal_force_commit(journal_t *journal) in ext4_journal_force_commit() argument
359 if (journal) in ext4_journal_force_commit()
360 return jbd2_journal_force_commit(journal); in ext4_journal_force_commit()

12