/fs/jbd/ |
D | journal.c | 85 static void __journal_abort_soft (journal_t *journal, int errno); 116 journal_t *journal = arg; in kjournald() local 123 setup_timer(&journal->j_commit_timer, commit_timeout, in kjournald() 127 journal->j_task = current; in kjournald() 128 wake_up(&journal->j_wait_done_commit); in kjournald() 131 journal->j_commit_interval / HZ); in kjournald() 136 spin_lock(&journal->j_state_lock); in kjournald() 139 if (journal->j_flags & JFS_UNMOUNT) in kjournald() 143 journal->j_commit_sequence, journal->j_commit_request); in kjournald() 145 if (journal->j_commit_sequence != journal->j_commit_request) { in kjournald() [all …]
|
D | checkpoint.c | 116 void __log_wait_for_space(journal_t *journal) in __log_wait_for_space() argument 119 assert_spin_locked(&journal->j_state_lock); in __log_wait_for_space() 121 nblocks = jbd_space_needed(journal); in __log_wait_for_space() 122 while (__log_space_left(journal) < nblocks) { in __log_wait_for_space() 123 if (journal->j_flags & JFS_ABORT) in __log_wait_for_space() 125 spin_unlock(&journal->j_state_lock); in __log_wait_for_space() 126 mutex_lock(&journal->j_checkpoint_mutex); in __log_wait_for_space() 139 spin_lock(&journal->j_state_lock); in __log_wait_for_space() 140 spin_lock(&journal->j_list_lock); in __log_wait_for_space() 141 nblocks = jbd_space_needed(journal); in __log_wait_for_space() [all …]
|
D | commit.c | 98 static int inverted_lock(journal_t *journal, struct buffer_head *bh) in inverted_lock() argument 101 spin_unlock(&journal->j_list_lock); in inverted_lock() 115 static int journal_write_commit_record(journal_t *journal, in journal_write_commit_record() argument 124 if (is_journal_aborted(journal)) in journal_write_commit_record() 127 descriptor = journal_get_descriptor_buffer(journal); in journal_write_commit_record() 140 if (journal->j_flags & JFS_BARRIER) { in journal_write_commit_record() 158 bdevname(journal->j_dev, b)); in journal_write_commit_record() 159 spin_lock(&journal->j_state_lock); in journal_write_commit_record() 160 journal->j_flags &= ~JFS_BARRIER; in journal_write_commit_record() 161 spin_unlock(&journal->j_state_lock); in journal_write_commit_record() [all …]
|
D | revoke.c | 109 static inline int hash(journal_t *journal, unsigned long block) in hash() argument 111 struct jbd_revoke_table_s *table = journal->j_revoke; in hash() 119 static int insert_revoke_hash(journal_t *journal, unsigned long blocknr, in insert_revoke_hash() argument 132 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash() 133 spin_lock(&journal->j_revoke_lock); in insert_revoke_hash() 135 spin_unlock(&journal->j_revoke_lock); in insert_revoke_hash() 148 static struct jbd_revoke_record_s *find_revoke_record(journal_t *journal, in find_revoke_record() argument 154 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record() 156 spin_lock(&journal->j_revoke_lock); in find_revoke_record() 160 spin_unlock(&journal->j_revoke_lock); in find_revoke_record() [all …]
|
D | transaction.c | 49 get_transaction(journal_t *journal, transaction_t *transaction) in get_transaction() argument 51 transaction->t_journal = journal; in get_transaction() 54 transaction->t_tid = journal->j_transaction_sequence++; in get_transaction() 55 transaction->t_expires = jiffies + journal->j_commit_interval; in get_transaction() 59 journal->j_commit_timer.expires = round_jiffies(transaction->t_expires); in get_transaction() 60 add_timer(&journal->j_commit_timer); in get_transaction() 62 J_ASSERT(journal->j_running_transaction == NULL); in get_transaction() 63 journal->j_running_transaction = transaction; in get_transaction() 83 static int start_this_handle(journal_t *journal, handle_t *handle) in start_this_handle() argument 91 if (nblocks > journal->j_max_transaction_buffers) { in start_this_handle() [all …]
|
D | recovery.c | 41 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 …]
|
D | Makefile | 7 jbd-objs := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
|
/fs/jbd2/ |
D | journal.c | 90 static void __journal_abort_soft (journal_t *journal, int errno); 121 journal_t *journal = arg; in kjournald2() local 128 setup_timer(&journal->j_commit_timer, commit_timeout, in kjournald2() 132 journal->j_task = current; in kjournald2() 133 wake_up(&journal->j_wait_done_commit); in kjournald2() 137 journal->j_devname, journal->j_commit_interval / HZ); in kjournald2() 142 spin_lock(&journal->j_state_lock); in kjournald2() 145 if (journal->j_flags & JBD2_UNMOUNT) in kjournald2() 149 journal->j_commit_sequence, journal->j_commit_request); in kjournald2() 151 if (journal->j_commit_sequence != journal->j_commit_request) { in kjournald2() [all …]
|
D | checkpoint.c | 117 void __jbd2_log_wait_for_space(journal_t *journal) in __jbd2_log_wait_for_space() argument 120 assert_spin_locked(&journal->j_state_lock); in __jbd2_log_wait_for_space() 122 nblocks = jbd_space_needed(journal); in __jbd2_log_wait_for_space() 123 while (__jbd2_log_space_left(journal) < nblocks) { in __jbd2_log_wait_for_space() 124 if (journal->j_flags & JBD2_ABORT) in __jbd2_log_wait_for_space() 126 spin_unlock(&journal->j_state_lock); in __jbd2_log_wait_for_space() 127 mutex_lock(&journal->j_checkpoint_mutex); in __jbd2_log_wait_for_space() 140 spin_lock(&journal->j_state_lock); in __jbd2_log_wait_for_space() 141 spin_lock(&journal->j_list_lock); in __jbd2_log_wait_for_space() 142 nblocks = jbd_space_needed(journal); in __jbd2_log_wait_for_space() [all …]
|
D | commit.c | 94 static int journal_submit_commit_record(journal_t *journal, in journal_submit_commit_record() argument 106 if (is_journal_aborted(journal)) in journal_submit_commit_record() 109 descriptor = jbd2_journal_get_descriptor_buffer(journal); in journal_submit_commit_record() 122 if (JBD2_HAS_COMPAT_FEATURE(journal, in journal_submit_commit_record() 135 if (journal->j_flags & JBD2_BARRIER && in journal_submit_commit_record() 136 !JBD2_HAS_INCOMPAT_FEATURE(journal, in journal_submit_commit_record() 153 "disabling barriers\n", journal->j_devname); in journal_submit_commit_record() 154 spin_lock(&journal->j_state_lock); in journal_submit_commit_record() 155 journal->j_flags &= ~JBD2_BARRIER; in journal_submit_commit_record() 156 spin_unlock(&journal->j_state_lock); in journal_submit_commit_record() [all …]
|
D | revoke.c | 109 static inline int hash(journal_t *journal, unsigned long long block) in hash() argument 111 struct jbd2_revoke_table_s *table = journal->j_revoke; in hash() 120 static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr, in insert_revoke_hash() argument 133 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash() 134 spin_lock(&journal->j_revoke_lock); in insert_revoke_hash() 136 spin_unlock(&journal->j_revoke_lock); in insert_revoke_hash() 149 static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal, in find_revoke_record() argument 155 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record() 157 spin_lock(&journal->j_revoke_lock); in find_revoke_record() 161 spin_unlock(&journal->j_revoke_lock); in find_revoke_record() [all …]
|
D | transaction.c | 48 jbd2_get_transaction(journal_t *journal, transaction_t *transaction) in jbd2_get_transaction() argument 50 transaction->t_journal = journal; in jbd2_get_transaction() 53 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction() 54 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction() 60 journal->j_commit_timer.expires = round_jiffies(transaction->t_expires); in jbd2_get_transaction() 61 add_timer(&journal->j_commit_timer); in jbd2_get_transaction() 63 J_ASSERT(journal->j_running_transaction == NULL); in jbd2_get_transaction() 64 journal->j_running_transaction = transaction; in jbd2_get_transaction() 86 static int start_this_handle(journal_t *journal, handle_t *handle) in start_this_handle() argument 95 if (nblocks > journal->j_max_transaction_buffers) { in start_this_handle() [all …]
|
D | recovery.c | 42 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 …]
|
D | Makefile | 7 jbd2-objs := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
|
/fs/reiserfs/ |
D | journal.c | 102 struct reiserfs_journal *journal); 121 struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb); in init_journal_hash() local 122 memset(journal->j_hash_table, 0, in init_journal_hash() 169 struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb); in get_bitmap_node() local 171 struct list_head *entry = journal->j_bitmap_nodes.next; in get_bitmap_node() 173 journal->j_used_bitmap_nodes++; in get_bitmap_node() 176 if (entry != &journal->j_bitmap_nodes) { in get_bitmap_node() 180 journal->j_free_bitmap_nodes--; in get_bitmap_node() 193 struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb); in free_bitmap_node() local 194 journal->j_used_bitmap_nodes--; in free_bitmap_node() [all …]
|
/fs/ocfs2/ |
D | journal.c | 216 struct ocfs2_journal *journal = NULL; in ocfs2_commit_cache() local 220 journal = osb->journal; in ocfs2_commit_cache() 223 down_write(&journal->j_trans_barrier); in ocfs2_commit_cache() 225 if (atomic_read(&journal->j_num_trans) == 0) { in ocfs2_commit_cache() 226 up_write(&journal->j_trans_barrier); in ocfs2_commit_cache() 231 jbd2_journal_lock_updates(journal->j_journal); in ocfs2_commit_cache() 232 status = jbd2_journal_flush(journal->j_journal); in ocfs2_commit_cache() 233 jbd2_journal_unlock_updates(journal->j_journal); in ocfs2_commit_cache() 235 up_write(&journal->j_trans_barrier); in ocfs2_commit_cache() 240 old_id = ocfs2_inc_trans_id(journal); in ocfs2_commit_cache() [all …]
|
D | journal.h | 82 static inline void ocfs2_set_inode_lock_trans(struct ocfs2_journal *journal, in ocfs2_set_inode_lock_trans() argument 86 OCFS2_I(inode)->ip_last_trans = journal->j_trans_id; in ocfs2_set_inode_lock_trans() 98 struct ocfs2_journal *journal = OCFS2_SB(inode->i_sb)->journal; in ocfs2_inode_fully_checkpointed() local 101 ret = time_after(journal->j_trans_id, OCFS2_I(inode)->ip_last_trans); in ocfs2_inode_fully_checkpointed() 119 ret = !(time_after(OCFS2_SB(inode->i_sb)->journal->j_trans_id, in ocfs2_inode_is_new() 131 OCFS2_I(inode)->ip_created_trans = osb->journal->j_trans_id; in ocfs2_inode_set_new() 159 int ocfs2_journal_init(struct ocfs2_journal *journal, 162 int ocfs2_journal_wipe(struct ocfs2_journal *journal, 164 int ocfs2_journal_load(struct ocfs2_journal *journal, int local, 195 wait_event(osb->journal->j_checkpointed, in ocfs2_checkpoint_inode() [all …]
|
D | super.c | 233 if (jbd2_journal_start_commit(OCFS2_SB(sb)->journal->j_journal, in ocfs2_sync_fs() 236 jbd2_log_wait_commit(OCFS2_SB(sb)->journal->j_journal, in ocfs2_sync_fs() 1719 struct ocfs2_journal *journal; in ocfs2_initialize_super() local 1880 journal = kzalloc(sizeof(struct ocfs2_journal), GFP_KERNEL); in ocfs2_initialize_super() 1881 if (!journal) { in ocfs2_initialize_super() 1886 osb->journal = journal; in ocfs2_initialize_super() 1887 journal->j_osb = osb; in ocfs2_initialize_super() 1889 atomic_set(&journal->j_num_trans, 0); in ocfs2_initialize_super() 1890 init_rwsem(&journal->j_trans_barrier); in ocfs2_initialize_super() 1891 init_waitqueue_head(&journal->j_checkpointed); in ocfs2_initialize_super() [all …]
|
/fs/ext3/ |
D | super.c | 77 journal_t *journal; in ext3_journal_start_sb() local 85 journal = EXT3_SB(sb)->s_journal; in ext3_journal_start_sb() 86 if (is_journal_aborted(journal)) { in ext3_journal_start_sb() 92 return journal_start(journal, nblocks); in ext3_journal_start_sb() 165 journal_t *journal = EXT3_SB(sb)->s_journal; in ext3_handle_error() local 168 if (journal) in ext3_handle_error() 169 journal_abort(journal, -EIO); in ext3_handle_error() 695 journal_t *journal = EXT3_SB(sb)->s_journal; in bdev_try_to_free_page() local 700 if (journal) in bdev_try_to_free_page() 701 return journal_try_to_free_buffers(journal, page, in bdev_try_to_free_page() [all …]
|
D | Kconfig | 11 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
|
D | inode.c | 1384 journal_t *journal; in ext3_bmap() local 1407 journal = EXT3_JOURNAL(inode); in ext3_bmap() 1408 journal_lock_updates(journal); in ext3_bmap() 1409 err = journal_flush(journal); in ext3_bmap() 1410 journal_unlock_updates(journal); in ext3_bmap() 1662 journal_t *journal = EXT3_JOURNAL(page->mapping->host); in ext3_invalidatepage() local 1670 journal_invalidatepage(journal, page, offset); in ext3_invalidatepage() 1675 journal_t *journal = EXT3_JOURNAL(page->mapping->host); in ext3_releasepage() local 1680 return journal_try_to_free_buffers(journal, page, wait); in ext3_releasepage() 3301 journal_t *journal; in ext3_change_inode_journal_flag() local [all …]
|
/fs/ext4/ |
D | super.c | 192 journal_t *journal; in ext4_journal_start_sb() local 200 journal = EXT4_SB(sb)->s_journal; in ext4_journal_start_sb() 201 if (journal) { in ext4_journal_start_sb() 202 if (is_journal_aborted(journal)) { in ext4_journal_start_sb() 207 return jbd2_journal_start(journal, nblocks); in ext4_journal_start_sb() 296 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_handle_error() local 299 if (journal) in ext4_handle_error() 300 jbd2_journal_abort(journal, -EIO); in ext4_handle_error() 914 journal_t *journal = EXT4_SB(sb)->s_journal; in bdev_try_to_free_page() local 919 if (journal) in bdev_try_to_free_page() [all …]
|
D | fsync.c | 50 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_sync_file() local 95 if (journal && (journal->j_flags & JBD2_BARRIER)) in ext4_sync_file()
|
D | ext4_jbd2.h | 239 static inline int ext4_journal_force_commit(journal_t *journal) in ext4_journal_force_commit() argument 241 if (journal) in ext4_journal_force_commit() 242 return jbd2_journal_force_commit(journal); in ext4_journal_force_commit()
|
/fs/ubifs/ |
D | Makefile | 3 ubifs-y += shrinker.o journal.o file.o dir.o super.o sb.o io.o
|