/fs/ext4/ |
D | ext4_jbd2.c | 13 handle_t *handle = current->journal_info; in ext4_get_nojournal() local 14 unsigned long ref_cnt = (unsigned long)handle; in ext4_get_nojournal() 19 handle = (handle_t *)ref_cnt; in ext4_get_nojournal() 21 current->journal_info = handle; in ext4_get_nojournal() 22 return handle; in ext4_get_nojournal() 27 static void ext4_put_nojournal(handle_t *handle) in ext4_put_nojournal() argument 29 unsigned long ref_cnt = (unsigned long)handle; in ext4_put_nojournal() 34 handle = (handle_t *)ref_cnt; in ext4_put_nojournal() 36 current->journal_info = handle; in ext4_put_nojournal() 85 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle) in __ext4_journal_stop() argument [all …]
|
D | ext4_jbd2.h | 168 static inline void _ext4_journal_callback_add(handle_t *handle, in _ext4_journal_callback_add() argument 172 list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list); in _ext4_journal_callback_add() 175 static inline void ext4_journal_callback_add(handle_t *handle, in ext4_journal_callback_add() argument 182 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_add() 187 _ext4_journal_callback_add(handle, jce); in ext4_journal_callback_add() 198 static inline bool ext4_journal_callback_try_del(handle_t *handle, in ext4_journal_callback_try_del() argument 203 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_try_del() 213 ext4_mark_iloc_dirty(handle_t *handle, 222 int ext4_reserve_inode_write(handle_t *handle, struct inode *inode, 225 int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode); [all …]
|
D | migrate.c | 21 static int finish_range(handle_t *handle, struct inode *inode, in finish_range() argument 56 if (needed && ext4_handle_has_enough_credits(handle, in finish_range() 59 retval = ext4_journal_restart(handle, needed); in finish_range() 64 retval = ext4_journal_extend(handle, needed); in finish_range() 70 retval = ext4_journal_restart(handle, needed); in finish_range() 76 retval = ext4_ext_insert_extent(handle, inode, &path, &newext, 0); in finish_range() 85 static int update_extent_range(handle_t *handle, struct inode *inode, in update_extent_range() argument 103 retval = finish_range(handle, inode, lb); in update_extent_range() 110 static int update_ind_extent_range(handle_t *handle, struct inode *inode, in update_ind_extent_range() argument 126 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() 407 static int ext4_splice_branch(handle_t *handle, in ext4_splice_branch() argument 422 err = ext4_journal_get_write_access(handle, where->bh); in ext4_splice_branch() 453 err = ext4_handle_dirty_metadata(handle, ar->inode, where->bh); in ext4_splice_branch() [all …]
|
D | namei.c | 53 static struct buffer_head *ext4_append(handle_t *handle, in ext4_append() argument 67 bh = ext4_bread(handle, inode, *block, EXT4_GET_BLOCKS_CREATE); in ext4_append() 73 err = ext4_journal_get_write_access(handle, bh); in ext4_append() 292 static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname, 399 int ext4_handle_dirty_dirblock(handle_t *handle, in ext4_handle_dirty_dirblock() argument 404 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dirblock() 509 static inline int ext4_handle_dirty_dx_node(handle_t *handle, in ext4_handle_dirty_dx_node() argument 514 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dx_node() 1810 static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, in do_split() argument 1829 bh2 = ext4_append(handle, dir, &newblock); in do_split() [all …]
|
D | inode.c | 144 static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh); 172 int ext4_truncate_restart_trans(handle_t *handle, struct inode *inode, in ext4_truncate_restart_trans() argument 184 jbd_debug(2, "restarting handle %p\n", handle); in ext4_truncate_restart_trans() 186 ret = ext4_journal_restart(handle, nblocks); in ext4_truncate_restart_trans() 198 handle_t *handle; in ext4_evict_inode() local 265 handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, in ext4_evict_inode() 267 if (IS_ERR(handle)) { in ext4_evict_inode() 268 ext4_std_error(inode->i_sb, PTR_ERR(handle)); in ext4_evict_inode() 280 ext4_handle_sync(handle); in ext4_evict_inode() 292 err = ext4_mark_inode_dirty(handle, inode); in ext4_evict_inode() [all …]
|
D | inline.c | 250 static int ext4_create_inline_data(handle_t *handle, in ext4_create_inline_data() argument 268 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_create_inline_data() 290 error = ext4_xattr_ibody_inline_set(handle, inode, &i, &is); in ext4_create_inline_data() 307 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_create_inline_data() 314 static int ext4_update_inline_data(handle_t *handle, struct inode *inode, in ext4_update_inline_data() argument 354 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_update_inline_data() 362 error = ext4_xattr_ibody_inline_set(handle, inode, &i, &is); in ext4_update_inline_data() 372 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_update_inline_data() 380 static int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, in ext4_prepare_inline_data() argument 396 ret = ext4_update_inline_data(handle, inode, len); in ext4_prepare_inline_data() [all …]
|
D | resize.c | 370 static struct buffer_head *bclean(handle_t *handle, struct super_block *sb, in bclean() argument 380 if ((err = ext4_journal_get_write_access(handle, bh))) { in bclean() 396 static int extend_or_restart_transaction(handle_t *handle, int thresh) in extend_or_restart_transaction() argument 400 if (ext4_handle_has_enough_credits(handle, thresh)) in extend_or_restart_transaction() 403 err = ext4_journal_extend(handle, EXT4_MAX_TRANS_DATA); in extend_or_restart_transaction() 407 err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA); in extend_or_restart_transaction() 424 static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle, in set_flexbg_block_bitmap() argument 454 err = extend_or_restart_transaction(handle, 1); in set_flexbg_block_bitmap() 463 err = ext4_journal_get_write_access(handle, bh); in set_flexbg_block_bitmap() 472 err = ext4_handle_dirty_metadata(handle, NULL, bh); in set_flexbg_block_bitmap() [all …]
|
D | extents.c | 86 static int ext4_split_extent(handle_t *handle, 93 static int ext4_split_extent_at(handle_t *handle, 103 static int ext4_ext_truncate_extend_restart(handle_t *handle, in ext4_ext_truncate_extend_restart() argument 109 if (!ext4_handle_valid(handle)) in ext4_ext_truncate_extend_restart() 111 if (handle->h_buffer_credits >= needed) in ext4_ext_truncate_extend_restart() 118 err = ext4_journal_extend(handle, needed - handle->h_buffer_credits); in ext4_ext_truncate_extend_restart() 121 err = ext4_truncate_restart_trans(handle, inode, needed); in ext4_ext_truncate_extend_restart() 133 static int ext4_ext_get_access(handle_t *handle, struct inode *inode, in ext4_ext_get_access() argument 139 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access() 152 int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle, in __ext4_ext_dirty() argument [all …]
|
D | xattr.c | 785 static void ext4_xattr_update_super_block(handle_t *handle, in ext4_xattr_update_super_block() argument 792 if (ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh) == 0) { in ext4_xattr_update_super_block() 794 ext4_handle_dirty_super(handle, sb); in ext4_xattr_update_super_block() 970 static int ext4_xattr_ensure_credits(handle_t *handle, struct inode *inode, in ext4_xattr_ensure_credits() argument 976 if (!ext4_handle_valid(handle)) in ext4_xattr_ensure_credits() 979 if (handle->h_buffer_credits >= credits) in ext4_xattr_ensure_credits() 982 error = ext4_journal_extend(handle, credits - handle->h_buffer_credits); in ext4_xattr_ensure_credits() 993 error = ext4_handle_dirty_metadata(handle, NULL, bh); in ext4_xattr_ensure_credits() 1001 error = ext4_journal_restart(handle, credits); in ext4_xattr_ensure_credits() 1008 error = ext4_journal_get_write_access(handle, bh); in ext4_xattr_ensure_credits() [all …]
|
D | verity.c | 113 handle_t *handle; in ext4_begin_enable_verity() local 151 handle = ext4_journal_start(inode, EXT4_HT_INODE, credits); in ext4_begin_enable_verity() 152 if (IS_ERR(handle)) in ext4_begin_enable_verity() 153 return PTR_ERR(handle); in ext4_begin_enable_verity() 155 err = ext4_orphan_add(handle, inode); in ext4_begin_enable_verity() 159 ext4_journal_stop(handle); in ext4_begin_enable_verity() 200 handle_t *handle; in ext4_end_enable_verity() local 227 handle = ext4_journal_start(inode, EXT4_HT_INODE, credits); in ext4_end_enable_verity() 228 if (IS_ERR(handle)) { in ext4_end_enable_verity() 230 return PTR_ERR(handle); in ext4_end_enable_verity() [all …]
|
/fs/jbd2/ |
D | transaction.c | 298 static int start_this_handle(journal_t *journal, handle_t *handle, in start_this_handle() argument 302 int blocks = handle->h_buffer_credits; in start_this_handle() 306 if (handle->h_rsv_handle) in start_this_handle() 307 rsv_blocks = handle->h_rsv_handle->h_buffer_credits; in start_this_handle() 338 jbd_debug(3, "New handle %p going live.\n", handle); in start_this_handle() 359 if (!handle->h_reserved && journal->j_barrier_count) { in start_this_handle() 372 (handle->h_reserved || !journal->j_barrier_count)) { in start_this_handle() 382 if (!handle->h_reserved) { in start_this_handle() 399 handle->h_reserved = 0; in start_this_handle() 406 handle->h_transaction = transaction; in start_this_handle() [all …]
|
/fs/ |
D | fhandle.c | 24 struct file_handle *handle = NULL; in do_sys_name_to_handle() local 40 handle = kmalloc(sizeof(struct file_handle) + f_handle.handle_bytes, in do_sys_name_to_handle() 42 if (!handle) in do_sys_name_to_handle() 50 (struct fid *)handle->f_handle, in do_sys_name_to_handle() 52 handle->handle_type = retval; in do_sys_name_to_handle() 55 handle->handle_bytes = handle_bytes; in do_sys_name_to_handle() 56 if ((handle->handle_bytes > f_handle.handle_bytes) || in do_sys_name_to_handle() 73 copy_to_user(ufh, handle, in do_sys_name_to_handle() 76 kfree(handle); in do_sys_name_to_handle() 94 struct file_handle __user *, handle, int __user *, mnt_id, in SYSCALL_DEFINE5() [all …]
|
/fs/ocfs2/ |
D | namei.c | 62 handle_t *handle, 73 handle_t *handle, 82 handle_t *handle, 231 handle_t *handle = NULL; in ocfs2_mknod() local 356 handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb, in ocfs2_mknod() 359 if (IS_ERR(handle)) { in ocfs2_mknod() 360 status = PTR_ERR(handle); in ocfs2_mknod() 361 handle = NULL; in ocfs2_mknod() 377 &new_fe_bh, parent_fe_bh, handle, in ocfs2_mknod() 385 status = ocfs2_fill_new_dir(osb, handle, dir, inode, in ocfs2_mknod() [all …]
|
D | alloc.c | 155 static int ocfs2_reuse_blk_from_dealloc(handle_t *handle, 524 static inline int ocfs2_et_root_journal_access(handle_t *handle, in ocfs2_et_root_journal_access() argument 528 return et->et_root_journal_access(handle, et->et_ci, et->et_root_bh, in ocfs2_et_root_journal_access() 566 static void ocfs2_adjust_rightmost_records(handle_t *handle, 721 int ocfs2_path_bh_journal_access(handle_t *handle, in ocfs2_path_bh_journal_access() argument 734 return access(handle, ci, path->p_node[idx].bh, in ocfs2_path_bh_journal_access() 742 handle_t *handle, in ocfs2_journal_access_path() argument 751 ret = ocfs2_path_bh_journal_access(handle, ci, path, i); in ocfs2_journal_access_path() 987 static int ocfs2_create_new_meta_bhs(handle_t *handle, in ocfs2_create_new_meta_bhs() argument 1003 status = ocfs2_claim_metadata(handle, in ocfs2_create_new_meta_bhs() [all …]
|
D | suballoc.c | 69 static int ocfs2_block_group_fill(handle_t *handle, 94 handle_t *handle, 100 static int ocfs2_relink_block_group(handle_t *handle, 342 static int ocfs2_block_group_fill(handle_t *handle, in ocfs2_block_group_fill() argument 363 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_fill() 391 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_block_group_fill() 419 ocfs2_block_group_alloc_contig(struct ocfs2_super *osb, handle_t *handle, in ocfs2_block_group_alloc_contig() argument 430 status = ocfs2_claim_clusters(handle, ac, in ocfs2_block_group_alloc_contig() 452 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_contig() 464 handle_t *handle, in ocfs2_block_group_claim_bits() argument [all …]
|
D | file.c | 256 handle_t *handle; in ocfs2_update_inode_atime() local 259 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_update_inode_atime() 260 if (IS_ERR(handle)) { in ocfs2_update_inode_atime() 261 ret = PTR_ERR(handle); in ocfs2_update_inode_atime() 266 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), bh, in ocfs2_update_inode_atime() 281 ocfs2_update_inode_fsync_trans(handle, inode, 0); in ocfs2_update_inode_atime() 282 ocfs2_journal_dirty(handle, bh); in ocfs2_update_inode_atime() 285 ocfs2_commit_trans(osb, handle); in ocfs2_update_inode_atime() 290 int ocfs2_set_inode_size(handle_t *handle, in ocfs2_set_inode_size() argument 301 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); in ocfs2_set_inode_size() [all …]
|
D | journal.h | 244 handle_t *handle); 245 int ocfs2_extend_trans(handle_t *handle, int nblocks); 246 int ocfs2_allocate_extend_trans(handle_t *handle, 275 int ocfs2_journal_access_di(handle_t *handle, struct ocfs2_caching_info *ci, 278 int ocfs2_journal_access_eb(handle_t *handle, struct ocfs2_caching_info *ci, 281 int ocfs2_journal_access_rb(handle_t *handle, struct ocfs2_caching_info *ci, 284 int ocfs2_journal_access_gd(handle_t *handle, struct ocfs2_caching_info *ci, 287 int ocfs2_journal_access_xb(handle_t *handle, struct ocfs2_caching_info *ci, 290 int ocfs2_journal_access_dq(handle_t *handle, struct ocfs2_caching_info *ci, 293 int ocfs2_journal_access_db(handle_t *handle, struct ocfs2_caching_info *ci, [all …]
|
D | dir.c | 59 handle_t *handle, 153 static int ocfs2_dx_dir_link_trailer(struct inode *dir, handle_t *handle, in ocfs2_dx_dir_link_trailer() argument 161 ret = ocfs2_journal_access_dr(handle, INODE_CACHE(dir), dx_root_bh, in ocfs2_dx_dir_link_trailer() 173 ocfs2_journal_dirty(handle, dx_root_bh); in ocfs2_dx_dir_link_trailer() 1089 int ocfs2_update_entry(struct inode *dir, handle_t *handle, in ocfs2_update_entry() argument 1107 ret = access(handle, INODE_CACHE(dir), de_bh, in ocfs2_update_entry() 1117 ocfs2_journal_dirty(handle, de_bh); in ocfs2_update_entry() 1127 static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir, in __ocfs2_delete_entry() argument 1149 status = access(handle, INODE_CACHE(dir), bh, in __ocfs2_delete_entry() 1161 ocfs2_journal_dirty(handle, bh); in __ocfs2_delete_entry() [all …]
|
D | localalloc.c | 47 handle_t *handle, 58 handle_t *handle, 371 handle_t *handle; in ocfs2_shutdown_local_alloc() local 418 handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS); in ocfs2_shutdown_local_alloc() 419 if (IS_ERR(handle)) { in ocfs2_shutdown_local_alloc() 420 mlog_errno(PTR_ERR(handle)); in ocfs2_shutdown_local_alloc() 421 handle = NULL; in ocfs2_shutdown_local_alloc() 434 status = ocfs2_journal_access_di(handle, INODE_CACHE(local_alloc_inode), in ocfs2_shutdown_local_alloc() 442 ocfs2_journal_dirty(handle, bh); in ocfs2_shutdown_local_alloc() 448 status = ocfs2_sync_local_to_main(osb, handle, alloc_copy, in ocfs2_shutdown_local_alloc() [all …]
|
D | refcounttree.c | 61 int (*cow_duplicate_clusters)(handle_t *handle, 553 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local 576 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree() 577 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree() 578 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree() 583 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree() 590 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree() 613 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree() 636 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree() 646 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree() [all …]
|
D | quota_local.c | 98 handle_t *handle; in ocfs2_modify_bh() local 101 handle = ocfs2_start_trans(OCFS2_SB(sb), in ocfs2_modify_bh() 103 if (IS_ERR(handle)) { in ocfs2_modify_bh() 104 status = PTR_ERR(handle); in ocfs2_modify_bh() 108 status = ocfs2_journal_access_dq(handle, INODE_CACHE(inode), bh, in ocfs2_modify_bh() 112 ocfs2_commit_trans(OCFS2_SB(sb), handle); in ocfs2_modify_bh() 118 ocfs2_journal_dirty(handle, bh); in ocfs2_modify_bh() 120 status = ocfs2_commit_trans(OCFS2_SB(sb), handle); in ocfs2_modify_bh() 467 handle_t *handle; in ocfs2_recover_local_quota_file() local 516 handle = ocfs2_start_trans(OCFS2_SB(sb), in ocfs2_recover_local_quota_file() [all …]
|
D | move_extents.c | 51 static int __ocfs2_move_extent(handle_t *handle, in __ocfs2_move_extent() argument 65 ret = ocfs2_duplicate_clusters_by_page(handle, inode, cpos, in __ocfs2_move_extent() 110 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in __ocfs2_move_extent() 118 ret = ocfs2_split_extent(handle, &context->et, path, index, in __ocfs2_move_extent() 126 ocfs2_journal_dirty(handle, context->et.et_root_bh); in __ocfs2_move_extent() 135 ret = ocfs2_decrease_refcount(inode, handle, in __ocfs2_move_extent() 141 ret = ocfs2_truncate_log_append(osb, handle, in __ocfs2_move_extent() 145 ocfs2_update_inode_fsync_trans(handle, inode, 0); in __ocfs2_move_extent() 211 handle_t *handle; in ocfs2_defrag_extent() local 284 handle = ocfs2_start_trans(osb, credits); in ocfs2_defrag_extent() [all …]
|
D | acl.c | 161 handle_t *handle, umode_t new_mode) in ocfs2_acl_set_mode() argument 175 if (handle == NULL) { in ocfs2_acl_set_mode() 176 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), in ocfs2_acl_set_mode() 178 if (IS_ERR(handle)) { in ocfs2_acl_set_mode() 179 ret = PTR_ERR(handle); in ocfs2_acl_set_mode() 188 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_acl_set_mode() 200 ocfs2_update_inode_fsync_trans(handle, inode, 0); in ocfs2_acl_set_mode() 202 ocfs2_journal_dirty(handle, di_bh); in ocfs2_acl_set_mode() 206 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_acl_set_mode() 216 static int ocfs2_set_acl(handle_t *handle, in ocfs2_set_acl() argument [all …]
|
D | suballoc.h | 76 handle_t *handle, 84 int ocfs2_block_group_set_bits(handle_t *handle, 91 int ocfs2_claim_metadata(handle_t *handle, 98 int ocfs2_claim_new_inode(handle_t *handle, 105 int ocfs2_claim_clusters(handle_t *handle, 114 int __ocfs2_claim_clusters(handle_t *handle, 121 int ocfs2_free_suballoc_bits(handle_t *handle, 127 int ocfs2_free_dinode(handle_t *handle, 131 int ocfs2_free_clusters(handle_t *handle, 136 int ocfs2_release_clusters(handle_t *handle, [all …]
|