/fs/ext4/ |
D | ext4_jbd2.c | 35 handle_t *handle = current->journal_info; in ext4_get_nojournal() local 36 unsigned long ref_cnt = (unsigned long)handle; in ext4_get_nojournal() 41 handle = (handle_t *)ref_cnt; in ext4_get_nojournal() 43 current->journal_info = handle; in ext4_get_nojournal() 44 return handle; in ext4_get_nojournal() 49 static void ext4_put_nojournal(handle_t *handle) in ext4_put_nojournal() argument 51 unsigned long ref_cnt = (unsigned long)handle; in ext4_put_nojournal() 56 handle = (handle_t *)ref_cnt; in ext4_put_nojournal() 58 current->journal_info = handle; in ext4_put_nojournal() 109 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, 227 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 53 retval = ext4_datasem_ensure_credits(handle, inode, needed, needed, 0); in finish_range() 56 retval = ext4_ext_insert_extent(handle, inode, &path, &newext, 0); in finish_range() 65 static int update_extent_range(handle_t *handle, struct inode *inode, in update_extent_range() argument 83 retval = finish_range(handle, inode, lb); in update_extent_range() 90 static int update_ind_extent_range(handle_t *handle, struct inode *inode, in update_ind_extent_range() argument 106 retval = update_extent_range(handle, inode, in update_ind_extent_range() 119 static int update_dind_extent_range(handle_t *handle, struct inode *inode, in update_dind_extent_range() argument 135 retval = update_ind_extent_range(handle, inode, in update_dind_extent_range() 149 static int update_tind_extent_range(handle_t *handle, struct inode *inode, in update_tind_extent_range() argument [all …]
|
D | indirect.c | 328 static int ext4_alloc_branch(handle_t *handle, in ext4_alloc_branch() argument 340 new_blocks[i] = ext4_mb_new_blocks(handle, ar, &err); in ext4_alloc_branch() 342 ar->goal = new_blocks[i] = ext4_new_meta_blocks(handle, in ext4_alloc_branch() 364 err = ext4_journal_get_create_access(handle, bh); in ext4_alloc_branch() 384 err = ext4_handle_dirty_metadata(handle, ar->inode, bh); in ext4_alloc_branch() 392 ext4_free_blocks(handle, ar->inode, NULL, new_blocks[i], in ext4_alloc_branch() 406 ext4_free_blocks(handle, ar->inode, branch[i+1].bh, in ext4_alloc_branch() 424 static int ext4_splice_branch(handle_t *handle, in ext4_splice_branch() argument 439 err = ext4_journal_get_write_access(handle, where->bh); in ext4_splice_branch() 470 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 83 bh = ext4_bread(handle, inode, *block, EXT4_GET_BLOCKS_CREATE); in ext4_append() 89 err = ext4_journal_get_write_access(handle, bh); in ext4_append() 324 static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname, 432 int ext4_handle_dirty_dirblock(handle_t *handle, in ext4_handle_dirty_dirblock() argument 437 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dirblock() 543 static inline int ext4_handle_dirty_dx_node(handle_t *handle, in ext4_handle_dirty_dx_node() argument 548 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dx_node() 1939 static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, in do_split() argument 1958 bh2 = ext4_append(handle, dir, newblock); in do_split() [all …]
|
D | inline.c | 262 static int ext4_create_inline_data(handle_t *handle, in ext4_create_inline_data() argument 280 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_create_inline_data() 302 error = ext4_xattr_ibody_set(handle, inode, &i, &is); in ext4_create_inline_data() 319 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_create_inline_data() 326 static int ext4_update_inline_data(handle_t *handle, struct inode *inode, in ext4_update_inline_data() argument 366 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_update_inline_data() 374 error = ext4_xattr_ibody_set(handle, inode, &i, &is); in ext4_update_inline_data() 384 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_update_inline_data() 392 static int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, in ext4_prepare_inline_data() argument 408 ret = ext4_update_inline_data(handle, inode, len); in ext4_prepare_inline_data() [all …]
|
D | inode.c | 142 static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh); 170 handle_t *handle; in ext4_evict_inode() local 255 handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, in ext4_evict_inode() 257 if (IS_ERR(handle)) { in ext4_evict_inode() 258 ext4_std_error(inode->i_sb, PTR_ERR(handle)); in ext4_evict_inode() 271 ext4_handle_sync(handle); in ext4_evict_inode() 283 err = ext4_mark_inode_dirty(handle, inode); in ext4_evict_inode() 300 err = ext4_xattr_delete_inode(handle, inode, &ea_inode_array, in ext4_evict_inode() 305 ext4_journal_stop(handle); in ext4_evict_inode() 321 ext4_orphan_del(handle, inode); in ext4_evict_inode() [all …]
|
D | file.c | 287 handle_t *handle; in ext4_handle_inode_extension() local 309 handle = ext4_journal_start(inode, EXT4_HT_INODE, 2); in ext4_handle_inode_extension() 311 if (IS_ERR(handle)) { in ext4_handle_inode_extension() 313 return PTR_ERR(handle); in ext4_handle_inode_extension() 316 ext4_orphan_del(handle, inode); in ext4_handle_inode_extension() 317 ext4_journal_stop(handle); in ext4_handle_inode_extension() 326 handle = ext4_journal_start(inode, EXT4_HT_INODE, 2); in ext4_handle_inode_extension() 327 if (IS_ERR(handle)) { in ext4_handle_inode_extension() 328 written = PTR_ERR(handle); in ext4_handle_inode_extension() 333 ret = ext4_mark_inode_dirty(handle, inode); in ext4_handle_inode_extension() [all …]
|
D | resize.c | 420 static struct buffer_head *bclean(handle_t *handle, struct super_block *sb, in bclean() argument 430 if ((err = ext4_journal_get_write_access(handle, bh))) { in bclean() 441 static int ext4_resize_ensure_credits_batch(handle_t *handle, int credits) in ext4_resize_ensure_credits_batch() argument 443 return ext4_journal_ensure_credits_fn(handle, credits, in ext4_resize_ensure_credits_batch() 456 static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle, in set_flexbg_block_bitmap() argument 486 err = ext4_resize_ensure_credits_batch(handle, 1); in set_flexbg_block_bitmap() 495 err = ext4_journal_get_write_access(handle, bh); in set_flexbg_block_bitmap() 504 err = ext4_handle_dirty_metadata(handle, NULL, bh); in set_flexbg_block_bitmap() 537 handle_t *handle; in setup_new_flex_group_blocks() local 550 handle = ext4_journal_start_sb(sb, EXT4_HT_RESIZE, EXT4_MAX_TRANS_DATA); in setup_new_flex_group_blocks() [all …]
|
D | extents.c | 87 static int ext4_split_extent_at(handle_t *handle, 117 int ext4_datasem_ensure_credits(handle_t *handle, struct inode *inode, in ext4_datasem_ensure_credits() argument 124 ret = ext4_journal_ensure_credits_fn(handle, check_cred, restart_cred, in ext4_datasem_ensure_credits() 136 static int ext4_ext_get_access(handle_t *handle, struct inode *inode, in ext4_ext_get_access() argument 144 err = ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access() 166 handle_t *handle, struct inode *inode, in __ext4_ext_dirty() argument 175 err = __ext4_handle_dirty_metadata(where, line, handle, in __ext4_ext_dirty() 182 err = ext4_mark_inode_dirty(handle, inode); in __ext4_ext_dirty() 187 #define ext4_ext_dirty(handle, inode, path) \ argument 188 __ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path)) [all …]
|
D | xattr.c | 797 static void ext4_xattr_update_super_block(handle_t *handle, in ext4_xattr_update_super_block() argument 804 if (ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh) == 0) { in ext4_xattr_update_super_block() 806 ext4_handle_dirty_super(handle, sb); in ext4_xattr_update_super_block() 982 static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode, in ext4_xattr_inode_update_ref() argument 991 ret = ext4_reserve_inode_write(handle, ea_inode, &iloc); in ext4_xattr_inode_update_ref() 1008 ext4_orphan_del(handle, ea_inode); in ext4_xattr_inode_update_ref() 1020 ext4_orphan_add(handle, ea_inode); in ext4_xattr_inode_update_ref() 1024 ret = ext4_mark_iloc_dirty(handle, ea_inode, &iloc); in ext4_xattr_inode_update_ref() 1033 static int ext4_xattr_inode_inc_ref(handle_t *handle, struct inode *ea_inode) in ext4_xattr_inode_inc_ref() argument 1035 return ext4_xattr_inode_update_ref(handle, ea_inode, 1); in ext4_xattr_inode_inc_ref() [all …]
|
D | verity.c | 110 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 232 handle = ext4_journal_start(inode, EXT4_HT_INODE, credits); in ext4_end_enable_verity() 233 if (IS_ERR(handle)) { in ext4_end_enable_verity() 234 err = PTR_ERR(handle); in ext4_end_enable_verity() [all …]
|
/fs/jbd2/ |
D | transaction.c | 325 static int start_this_handle(journal_t *journal, handle_t *handle, in start_this_handle() argument 329 int blocks = handle->h_total_credits; in start_this_handle() 333 if (handle->h_rsv_handle) in start_this_handle() 334 rsv_blocks = handle->h_rsv_handle->h_total_credits; in start_this_handle() 370 jbd_debug(3, "New handle %p going live.\n", handle); in start_this_handle() 391 if (!handle->h_reserved && journal->j_barrier_count) { in start_this_handle() 404 (handle->h_reserved || !journal->j_barrier_count)) { in start_this_handle() 414 if (!handle->h_reserved) { in start_this_handle() 431 handle->h_reserved = 0; in start_this_handle() 438 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, 232 handle_t *handle = NULL; in ocfs2_mknod() local 359 handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb, in ocfs2_mknod() 362 if (IS_ERR(handle)) { in ocfs2_mknod() 363 status = PTR_ERR(handle); in ocfs2_mknod() 364 handle = NULL; in ocfs2_mknod() 380 &new_fe_bh, parent_fe_bh, handle, in ocfs2_mknod() 389 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 | journal.h | 245 handle_t *handle); 246 int ocfs2_extend_trans(handle_t *handle, int nblocks); 247 int ocfs2_allocate_extend_trans(handle_t *handle, 276 int ocfs2_journal_access_di(handle_t *handle, struct ocfs2_caching_info *ci, 279 int ocfs2_journal_access_eb(handle_t *handle, struct ocfs2_caching_info *ci, 282 int ocfs2_journal_access_rb(handle_t *handle, struct ocfs2_caching_info *ci, 285 int ocfs2_journal_access_gd(handle_t *handle, struct ocfs2_caching_info *ci, 288 int ocfs2_journal_access_xb(handle_t *handle, struct ocfs2_caching_info *ci, 291 int ocfs2_journal_access_dq(handle_t *handle, struct ocfs2_caching_info *ci, 294 int ocfs2_journal_access_db(handle_t *handle, struct ocfs2_caching_info *ci, [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 | 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 | 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 | 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, 555 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local 578 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree() 579 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree() 580 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree() 585 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree() 592 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree() 615 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree() 638 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree() 648 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 | 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 | 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_split_extent(handle, &context->et, path, index, in __ocfs2_move_extent() 125 ret = ocfs2_decrease_refcount(inode, handle, in __ocfs2_move_extent() 131 ret = ocfs2_truncate_log_append(osb, handle, in __ocfs2_move_extent() 135 ocfs2_update_inode_fsync_trans(handle, inode, 0); in __ocfs2_move_extent() 201 handle_t *handle; in ocfs2_defrag_extent() local 274 handle = ocfs2_start_trans(osb, credits); in ocfs2_defrag_extent() 275 if (IS_ERR(handle)) { in ocfs2_defrag_extent() 276 ret = PTR_ERR(handle); in ocfs2_defrag_extent() [all …]
|