/fs/ext4/ |
D | ext4_jbd2.c | 12 handle_t *handle = current->journal_info; in ext4_get_nojournal() local 13 unsigned long ref_cnt = (unsigned long)handle; in ext4_get_nojournal() 18 handle = (handle_t *)ref_cnt; in ext4_get_nojournal() 20 current->journal_info = handle; in ext4_get_nojournal() 21 return handle; in ext4_get_nojournal() 26 static void ext4_put_nojournal(handle_t *handle) in ext4_put_nojournal() argument 28 unsigned long ref_cnt = (unsigned long)handle; in ext4_put_nojournal() 33 handle = (handle_t *)ref_cnt; in ext4_put_nojournal() 35 current->journal_info = handle; in ext4_put_nojournal() 80 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle) in __ext4_journal_stop() argument [all …]
|
D | ext4_jbd2.h | 180 static inline void ext4_journal_callback_add(handle_t *handle, in ext4_journal_callback_add() argument 187 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_add() 192 list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list); in ext4_journal_callback_add() 202 static inline bool ext4_journal_callback_try_del(handle_t *handle, in ext4_journal_callback_try_del() argument 207 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_try_del() 217 ext4_mark_iloc_dirty(handle_t *handle, 226 int ext4_reserve_inode_write(handle_t *handle, struct inode *inode, 229 int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode); 235 handle_t *handle, struct buffer_head *bh); 237 int __ext4_forget(const char *where, unsigned int line, handle_t *handle, [all …]
|
D | migrate.c | 28 static int finish_range(handle_t *handle, struct inode *inode, in finish_range() argument 63 if (needed && ext4_handle_has_enough_credits(handle, in finish_range() 66 retval = ext4_journal_restart(handle, needed); in finish_range() 71 retval = ext4_journal_extend(handle, needed); in finish_range() 77 retval = ext4_journal_restart(handle, needed); in finish_range() 83 retval = ext4_ext_insert_extent(handle, inode, &path, &newext, 0); in finish_range() 92 static int update_extent_range(handle_t *handle, struct inode *inode, in update_extent_range() argument 110 retval = finish_range(handle, inode, lb); in update_extent_range() 117 static int update_ind_extent_range(handle_t *handle, struct inode *inode, in update_ind_extent_range() argument 133 retval = update_extent_range(handle, inode, in update_ind_extent_range() [all …]
|
D | indirect.c | 321 static int ext4_alloc_branch(handle_t *handle, in ext4_alloc_branch() argument 333 new_blocks[i] = ext4_mb_new_blocks(handle, ar, &err); in ext4_alloc_branch() 335 ar->goal = new_blocks[i] = ext4_new_meta_blocks(handle, in ext4_alloc_branch() 354 err = ext4_journal_get_create_access(handle, bh); in ext4_alloc_branch() 374 err = ext4_handle_dirty_metadata(handle, ar->inode, bh); in ext4_alloc_branch() 388 ext4_forget(handle, 1, ar->inode, branch[i].bh, in ext4_alloc_branch() 390 ext4_free_blocks(handle, ar->inode, NULL, new_blocks[i], in ext4_alloc_branch() 411 static int ext4_splice_branch(handle_t *handle, in ext4_splice_branch() argument 426 err = ext4_journal_get_write_access(handle, where->bh); in ext4_splice_branch() 457 err = ext4_handle_dirty_metadata(handle, ar->inode, where->bh); in ext4_splice_branch() [all …]
|
D | namei.c | 51 static struct buffer_head *ext4_append(handle_t *handle, in ext4_append() argument 65 bh = ext4_bread(handle, inode, *block, 1); in ext4_append() 71 err = ext4_journal_get_write_access(handle, bh); in ext4_append() 273 static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname, 375 int ext4_handle_dirty_dirent_node(handle_t *handle, in ext4_handle_dirty_dirent_node() argument 380 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dirent_node() 486 static inline int ext4_handle_dirty_dx_node(handle_t *handle, in ext4_handle_dirty_dx_node() argument 491 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dx_node() 1671 static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, in do_split() argument 1691 bh2 = ext4_append(handle, dir, &newblock); in do_split() [all …]
|
D | inline.c | 246 static int ext4_create_inline_data(handle_t *handle, in ext4_create_inline_data() argument 264 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_create_inline_data() 286 error = ext4_xattr_ibody_inline_set(handle, inode, &i, &is); in ext4_create_inline_data() 303 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_create_inline_data() 310 static int ext4_update_inline_data(handle_t *handle, struct inode *inode, in ext4_update_inline_data() argument 348 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_update_inline_data() 356 error = ext4_xattr_ibody_inline_set(handle, inode, &i, &is); in ext4_update_inline_data() 366 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_update_inline_data() 374 static int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, in ext4_prepare_inline_data() argument 390 ret = ext4_update_inline_data(handle, inode, len); in ext4_prepare_inline_data() [all …]
|
D | inode.c | 137 static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh); 160 int ext4_truncate_restart_trans(handle_t *handle, struct inode *inode, in ext4_truncate_restart_trans() argument 172 jbd_debug(2, "restarting handle %p\n", handle); in ext4_truncate_restart_trans() 174 ret = ext4_journal_restart(handle, nblocks); in ext4_truncate_restart_trans() 186 handle_t *handle; in ext4_evict_inode() local 240 handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, in ext4_evict_inode() 242 if (IS_ERR(handle)) { in ext4_evict_inode() 243 ext4_std_error(inode->i_sb, PTR_ERR(handle)); in ext4_evict_inode() 255 ext4_handle_sync(handle); in ext4_evict_inode() 257 err = ext4_mark_inode_dirty(handle, inode); in ext4_evict_inode() [all …]
|
D | extents.c | 97 static int ext4_split_extent(handle_t *handle, 104 static int ext4_split_extent_at(handle_t *handle, 114 static int ext4_ext_truncate_extend_restart(handle_t *handle, in ext4_ext_truncate_extend_restart() argument 120 if (!ext4_handle_valid(handle)) in ext4_ext_truncate_extend_restart() 122 if (handle->h_buffer_credits > needed) in ext4_ext_truncate_extend_restart() 124 err = ext4_journal_extend(handle, needed); in ext4_ext_truncate_extend_restart() 127 err = ext4_truncate_restart_trans(handle, inode, needed); in ext4_ext_truncate_extend_restart() 139 static int ext4_ext_get_access(handle_t *handle, struct inode *inode, in ext4_ext_get_access() argument 145 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access() 158 int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle, in __ext4_ext_dirty() argument [all …]
|
D | resize.c | 342 static struct buffer_head *bclean(handle_t *handle, struct super_block *sb, in bclean() argument 352 if ((err = ext4_journal_get_write_access(handle, bh))) { in bclean() 368 static int extend_or_restart_transaction(handle_t *handle, int thresh) in extend_or_restart_transaction() argument 372 if (ext4_handle_has_enough_credits(handle, thresh)) in extend_or_restart_transaction() 375 err = ext4_journal_extend(handle, EXT4_MAX_TRANS_DATA); in extend_or_restart_transaction() 379 err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA); in extend_or_restart_transaction() 396 static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle, in set_flexbg_block_bitmap() argument 422 err = extend_or_restart_transaction(handle, 1); in set_flexbg_block_bitmap() 431 err = ext4_journal_get_write_access(handle, bh); in set_flexbg_block_bitmap() 438 err = ext4_handle_dirty_metadata(handle, NULL, bh); in set_flexbg_block_bitmap() [all …]
|
D | ioctl.c | 102 handle_t *handle; in swap_inode_boot_loader() local 135 handle = ext4_journal_start(inode_bl, EXT4_HT_MOVE_EXTENTS, 2); in swap_inode_boot_loader() 136 if (IS_ERR(handle)) { in swap_inode_boot_loader() 157 ext4_ext_tree_init(handle, inode_bl); in swap_inode_boot_loader() 173 err = ext4_mark_inode_dirty(handle, inode); in swap_inode_boot_loader() 181 err = ext4_mark_inode_dirty(handle, inode_bl); in swap_inode_boot_loader() 188 ext4_mark_inode_dirty(handle, inode); in swap_inode_boot_loader() 191 ext4_journal_stop(handle); in swap_inode_boot_loader() 227 handle_t *handle = NULL; in ext4_ioctl() local 287 handle = ext4_journal_start(inode, EXT4_HT_INODE, 1); in ext4_ioctl() [all …]
|
/fs/ext3/ |
D | inode.c | 58 int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, in ext3_forget() argument 82 return ext3_journal_forget(handle, bh); in ext3_forget() 91 err = ext3_journal_revoke(handle, blocknr, bh); in ext3_forget() 154 static int try_to_extend_transaction(handle_t *handle, struct inode *inode) in try_to_extend_transaction() argument 156 if (handle->h_buffer_credits > EXT3_RESERVE_TRANS_BLOCKS) in try_to_extend_transaction() 158 if (!ext3_journal_extend(handle, blocks_for_truncate(inode))) in try_to_extend_transaction() 168 static int truncate_restart_transaction(handle_t *handle, struct inode *inode) in truncate_restart_transaction() argument 172 jbd_debug(2, "restarting handle %p\n", handle); in truncate_restart_transaction() 180 ret = ext3_journal_restart(handle, blocks_for_truncate(inode)); in truncate_restart_transaction() 192 handle_t *handle; in ext3_evict_inode() local [all …]
|
D | ext3_jbd.c | 7 int __ext3_journal_get_undo_access(const char *where, handle_t *handle, in __ext3_journal_get_undo_access() argument 10 int err = journal_get_undo_access(handle, bh); in __ext3_journal_get_undo_access() 12 ext3_journal_abort_handle(where, __func__, bh, handle,err); in __ext3_journal_get_undo_access() 16 int __ext3_journal_get_write_access(const char *where, handle_t *handle, in __ext3_journal_get_write_access() argument 19 int err = journal_get_write_access(handle, bh); in __ext3_journal_get_write_access() 21 ext3_journal_abort_handle(where, __func__, bh, handle,err); in __ext3_journal_get_write_access() 25 int __ext3_journal_forget(const char *where, handle_t *handle, in __ext3_journal_forget() argument 28 int err = journal_forget(handle, bh); in __ext3_journal_forget() 30 ext3_journal_abort_handle(where, __func__, bh, handle,err); in __ext3_journal_forget() 34 int __ext3_journal_revoke(const char *where, handle_t *handle, in __ext3_journal_revoke() argument [all …]
|
D | resize.c | 112 static struct buffer_head *bclean(handle_t *handle, struct super_block *sb, in bclean() argument 121 if ((err = ext3_journal_get_write_access(handle, bh))) { in bclean() 158 static int extend_or_restart_transaction(handle_t *handle, int thresh, in extend_or_restart_transaction() argument 163 if (handle->h_buffer_credits >= thresh) in extend_or_restart_transaction() 166 err = ext3_journal_extend(handle, EXT3_MAX_TRANS_DATA); in extend_or_restart_transaction() 170 err = ext3_journal_restart(handle, EXT3_MAX_TRANS_DATA); in extend_or_restart_transaction() 173 err = ext3_journal_get_write_access(handle, bh); in extend_or_restart_transaction() 197 handle_t *handle; in setup_new_group_blocks() local 204 handle = ext3_journal_start_sb(sb, EXT3_MAX_TRANS_DATA); in setup_new_group_blocks() 206 if (IS_ERR(handle)) in setup_new_group_blocks() [all …]
|
D | namei.c | 40 static struct buffer_head *ext3_append(handle_t *handle, in ext3_append() argument 48 if ((bh = ext3_dir_bread(handle, inode, *block, 1, err))) { in ext3_append() 51 *err = ext3_journal_get_write_access(handle, bh); in ext3_append() 165 static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry, 1141 static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, in do_split() argument 1156 bh2 = ext3_append (handle, dir, &newblock, &err); in do_split() 1164 err = ext3_journal_get_write_access(handle, *bh); in do_split() 1169 err = ext3_journal_get_write_access(handle, frame->bh); in do_split() 1213 err = ext3_journal_dirty_metadata (handle, bh2); in do_split() 1216 err = ext3_journal_dirty_metadata (handle, frame->bh); in do_split() [all …]
|
D | ext3.h | 993 extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode, 995 extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode, 997 extern void ext3_free_blocks (handle_t *handle, struct inode *inode, 999 extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb, 1040 int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, 1044 int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, 1191 ext3_mark_iloc_dirty(handle_t *handle, 1200 int ext3_reserve_inode_write(handle_t *handle, struct inode *inode, 1203 int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode); 1212 static inline void ext3_journal_release_buffer(handle_t *handle, in ext3_journal_release_buffer() argument [all …]
|
D | ioctl.c | 30 handle_t *handle = NULL; in ext3_ioctl() local 80 handle = ext3_journal_start(inode, 1); in ext3_ioctl() 81 if (IS_ERR(handle)) { in ext3_ioctl() 82 err = PTR_ERR(handle); in ext3_ioctl() 86 handle->h_sync = 1; in ext3_ioctl() 87 err = ext3_reserve_inode_write(handle, inode, &iloc); in ext3_ioctl() 98 err = ext3_mark_iloc_dirty(handle, inode, &iloc); in ext3_ioctl() 100 ext3_journal_stop(handle); in ext3_ioctl() 116 handle_t *handle; in ext3_ioctl() local 133 handle = ext3_journal_start(inode, 1); in ext3_ioctl() [all …]
|
/fs/jbd2/ |
D | transaction.c | 257 static int start_this_handle(journal_t *journal, handle_t *handle, in start_this_handle() argument 261 int blocks = handle->h_buffer_credits; in start_this_handle() 276 if (handle->h_rsv_handle) in start_this_handle() 277 rsv_blocks = handle->h_rsv_handle->h_buffer_credits; in start_this_handle() 299 jbd_debug(3, "New handle %p going live.\n", handle); in start_this_handle() 320 if (!handle->h_reserved && journal->j_barrier_count) { in start_this_handle() 333 (handle->h_reserved || !journal->j_barrier_count)) { in start_this_handle() 343 if (!handle->h_reserved) { in start_this_handle() 354 handle->h_reserved = 0; in start_this_handle() 361 handle->h_transaction = transaction; in start_this_handle() [all …]
|
/fs/jbd/ |
D | transaction.c | 85 static int start_this_handle(journal_t *journal, handle_t *handle) in start_this_handle() argument 89 int nblocks = handle->h_buffer_credits; in start_this_handle() 110 jbd_debug(3, "New handle %p going live.\n", handle); in start_this_handle() 177 jbd_debug(2, "Handle %p starting new commit...\n", handle); in start_this_handle() 214 jbd_debug(2, "Handle %p waiting for checkpoint...\n", handle); in start_this_handle() 223 handle->h_transaction = transaction; in start_this_handle() 228 handle, nblocks, transaction->t_outstanding_credits, in start_this_handle() 233 lock_map_acquire(&handle->h_lockdep_map); in start_this_handle() 245 handle_t *handle = jbd_alloc_handle(GFP_NOFS); in new_handle() local 246 if (!handle) in new_handle() [all …]
|
/fs/ |
D | fhandle.c | 22 struct file_handle *handle = NULL; in do_sys_name_to_handle() local 38 handle = kmalloc(sizeof(struct file_handle) + f_handle.handle_bytes, in do_sys_name_to_handle() 40 if (!handle) in do_sys_name_to_handle() 48 (struct fid *)handle->f_handle, in do_sys_name_to_handle() 50 handle->handle_type = retval; in do_sys_name_to_handle() 53 handle->handle_bytes = handle_bytes; in do_sys_name_to_handle() 54 if ((handle->handle_bytes > f_handle.handle_bytes) || in do_sys_name_to_handle() 72 copy_to_user(ufh, handle, in do_sys_name_to_handle() 75 kfree(handle); in do_sys_name_to_handle() 93 struct file_handle __user *, handle, int __user *, mnt_id, in SYSCALL_DEFINE5() [all …]
|
/fs/ocfs2/ |
D | namei.c | 75 handle_t *handle, 85 handle_t *handle, 93 handle_t *handle, 215 handle_t *handle = NULL; in ocfs2_mknod() local 334 handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb, in ocfs2_mknod() 337 if (IS_ERR(handle)) { in ocfs2_mknod() 338 status = PTR_ERR(handle); in ocfs2_mknod() 339 handle = NULL; in ocfs2_mknod() 355 &new_fe_bh, parent_fe_bh, handle, in ocfs2_mknod() 363 status = ocfs2_fill_new_dir(osb, handle, dir, inode, in ocfs2_mknod() [all …]
|
D | alloc.c | 529 static inline int ocfs2_et_root_journal_access(handle_t *handle, in ocfs2_et_root_journal_access() argument 533 return et->et_root_journal_access(handle, et->et_ci, et->et_root_bh, in ocfs2_et_root_journal_access() 571 static void ocfs2_adjust_rightmost_records(handle_t *handle, 726 int ocfs2_path_bh_journal_access(handle_t *handle, in ocfs2_path_bh_journal_access() argument 739 return access(handle, ci, path->p_node[idx].bh, in ocfs2_path_bh_journal_access() 747 handle_t *handle, in ocfs2_journal_access_path() argument 756 ret = ocfs2_path_bh_journal_access(handle, ci, path, i); in ocfs2_journal_access_path() 997 static int ocfs2_create_new_meta_bhs(handle_t *handle, in ocfs2_create_new_meta_bhs() argument 1013 status = ocfs2_claim_metadata(handle, in ocfs2_create_new_meta_bhs() 1034 status = ocfs2_journal_access_eb(handle, et->et_ci, in ocfs2_create_new_meta_bhs() [all …]
|
D | dir.c | 76 handle_t *handle, 170 static int ocfs2_dx_dir_link_trailer(struct inode *dir, handle_t *handle, in ocfs2_dx_dir_link_trailer() argument 178 ret = ocfs2_journal_access_dr(handle, INODE_CACHE(dir), dx_root_bh, in ocfs2_dx_dir_link_trailer() 190 ocfs2_journal_dirty(handle, dx_root_bh); in ocfs2_dx_dir_link_trailer() 1116 int ocfs2_update_entry(struct inode *dir, handle_t *handle, in ocfs2_update_entry() argument 1134 ret = access(handle, INODE_CACHE(dir), de_bh, in ocfs2_update_entry() 1144 ocfs2_journal_dirty(handle, de_bh); in ocfs2_update_entry() 1154 static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir, in __ocfs2_delete_entry() argument 1176 status = access(handle, INODE_CACHE(dir), bh, in __ocfs2_delete_entry() 1188 ocfs2_journal_dirty(handle, bh); in __ocfs2_delete_entry() [all …]
|
D | refcounttree.c | 68 int (*cow_duplicate_clusters)(handle_t *handle, 563 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local 586 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree() 587 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree() 588 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree() 593 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree() 600 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree() 618 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree() 641 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree() 651 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree() [all …]
|
D | localalloc.c | 61 handle_t *handle, 72 handle_t *handle, 381 handle_t *handle; in ocfs2_shutdown_local_alloc() local 427 handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS); in ocfs2_shutdown_local_alloc() 428 if (IS_ERR(handle)) { in ocfs2_shutdown_local_alloc() 429 mlog_errno(PTR_ERR(handle)); in ocfs2_shutdown_local_alloc() 430 handle = NULL; in ocfs2_shutdown_local_alloc() 444 status = ocfs2_journal_access_di(handle, INODE_CACHE(local_alloc_inode), in ocfs2_shutdown_local_alloc() 452 ocfs2_journal_dirty(handle, bh); in ocfs2_shutdown_local_alloc() 458 status = ocfs2_sync_local_to_main(osb, handle, alloc_copy, in ocfs2_shutdown_local_alloc() [all …]
|
D | file.c | 267 handle_t *handle; in ocfs2_update_inode_atime() local 270 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_update_inode_atime() 271 if (IS_ERR(handle)) { in ocfs2_update_inode_atime() 272 ret = PTR_ERR(handle); in ocfs2_update_inode_atime() 277 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), bh, in ocfs2_update_inode_atime() 292 ocfs2_journal_dirty(handle, bh); in ocfs2_update_inode_atime() 295 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_update_inode_atime() 300 static int ocfs2_set_inode_size(handle_t *handle, in ocfs2_set_inode_size() argument 311 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); in ocfs2_set_inode_size() 327 handle_t *handle = NULL; in ocfs2_simple_size_update() local [all …]
|