Lines Matching refs:osb

316 static inline u16 ocfs2_xattr_buckets_per_cluster(struct ocfs2_super *osb)  in ocfs2_xattr_buckets_per_cluster()  argument
318 return (1 << osb->s_clustersize_bits) / OCFS2_XATTR_BUCKET_SIZE; in ocfs2_xattr_buckets_per_cluster()
600 struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); in ocfs2_calc_security_init() local
611 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, xattr_ac); in ocfs2_calc_security_init()
640 struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); in ocfs2_calc_xattr_init() local
647 if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) { in ocfs2_calc_xattr_init()
677 (S_ISDIR(mode) && ocfs2_supports_inline_data(osb)) || in ocfs2_calc_xattr_init()
700 if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL && in ocfs2_calc_xattr_init()
2358 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_remove_value_outside() local
2380 ctxt.handle = ocfs2_start_trans(osb, ref_credits + in ocfs2_remove_value_outside()
2381 ocfs2_remove_extent_credits(osb->sb)); in ocfs2_remove_value_outside()
2390 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_remove_value_outside()
2405 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_remove_value_outside()
2406 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_remove_value_outside()
2478 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_xattr_free_block() local
2504 xb_alloc_inode = ocfs2_get_system_file_inode(osb, in ocfs2_xattr_free_block()
2520 handle = ocfs2_start_trans(osb, OCFS2_SUBALLOC_FREE); in ocfs2_xattr_free_block()
2532 ocfs2_commit_trans(osb, handle); in ocfs2_xattr_free_block()
2712 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_xattr_ibody_init() local
2713 unsigned int xattrsize = osb->s_xattr_inline_size; in ocfs2_xattr_ibody_init()
3246 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_init_xattr_set_ctxt() local
3264 ret = ocfs2_reserve_new_metadata_blocks(osb, meta_add, in ocfs2_init_xattr_set_ctxt()
3273 ret = ocfs2_reserve_clusters(osb, clusters_add, &ctxt->data_ac); in ocfs2_init_xattr_set_ctxt()
3526 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_xattr_set() local
3527 struct inode *tl_inode = osb->osb_tl_inode; in ocfs2_xattr_set()
3609 if (ocfs2_truncate_log_needs_flush(osb)) { in ocfs2_xattr_set()
3610 ret = __ocfs2_flush_truncate_log(osb); in ocfs2_xattr_set()
3628 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_xattr_set()
3638 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_xattr_set()
3646 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_xattr_set()
3647 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_xattr_set()
3651 ocfs2_unlock_refcount_tree(osb, ref_tree, 1); in ocfs2_xattr_set()
4876 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_mv_xattr_buckets() local
4878 int num_buckets = ocfs2_xattr_buckets_per_cluster(osb); in ocfs2_mv_xattr_buckets()
5104 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_add_new_xattr_cluster() local
5131 block = ocfs2_clusters_to_blocks(osb->sb, bit_off); in ocfs2_add_new_xattr_cluster()
5135 (prev_clusters + num_bits) << osb->s_clustersize_bits <= in ocfs2_add_new_xattr_cluster()
5194 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_extend_xattr_bucket() local
5205 (num_clusters * ocfs2_xattr_buckets_per_cluster(osb))); in ocfs2_extend_xattr_bucket()
5274 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_add_new_xattr_bucket() local
5305 num_buckets = ocfs2_xattr_buckets_per_cluster(osb) * num_clusters; in ocfs2_add_new_xattr_bucket()
5419 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_rm_xattr_cluster() local
5420 struct inode *tl_inode = osb->osb_tl_inode; in ocfs2_rm_xattr_cluster()
5454 if (ocfs2_truncate_log_needs_flush(osb)) { in ocfs2_rm_xattr_cluster()
5455 ret = __ocfs2_flush_truncate_log(osb); in ocfs2_rm_xattr_cluster()
5462 handle = ocfs2_start_trans(osb, ocfs2_remove_extent_credits(osb->sb)); in ocfs2_rm_xattr_cluster()
5486 ret = ocfs2_truncate_log_append(osb, handle, blkno, len); in ocfs2_rm_xattr_cluster()
5492 ocfs2_commit_trans(osb, handle); in ocfs2_rm_xattr_cluster()
5494 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_rm_xattr_cluster()
5501 ocfs2_run_deallocs(osb, &dealloc); in ocfs2_rm_xattr_cluster()
5655 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_delete_xattr_in_bucket() local
5657 int credits = ocfs2_remove_extent_credits(osb->sb) + in ocfs2_delete_xattr_in_bucket()
5683 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_delete_xattr_in_bucket()
5693 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_delete_xattr_in_bucket()
5706 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_delete_xattr_in_bucket()
5707 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_delete_xattr_in_bucket()
5771 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_prepare_refcount_xattr() local
5804 if (ocfs2_meta_ecc(osb)) { in ocfs2_prepare_refcount_xattr()
5842 ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc), in ocfs2_prepare_refcount_xattr()
6276 static int ocfs2_reflink_lock_xattr_allocators(struct ocfs2_super *osb, in ocfs2_reflink_lock_xattr_allocators() argument
6288 ret = ocfs2_value_metas_in_xattr_header(osb->sb, NULL, xh, in ocfs2_reflink_lock_xattr_allocators()
6304 num_recs = num_recs / ocfs2_refcount_recs_per_rb(osb->sb) * 2; in ocfs2_reflink_lock_xattr_allocators()
6313 ret = ocfs2_reserve_new_metadata_blocks(osb, meta_add, meta_ac); in ocfs2_reflink_lock_xattr_allocators()
6462 struct ocfs2_super *osb = OCFS2_SB(args->old_inode->i_sb); in ocfs2_reflink_xattr_inline() local
6465 int header_off = osb->sb->s_blocksize - inline_size; in ocfs2_reflink_xattr_inline()
6478 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, in ocfs2_reflink_xattr_inline()
6485 handle = ocfs2_start_trans(osb, credits); in ocfs2_reflink_xattr_inline()
6532 ocfs2_commit_trans(osb, handle); in ocfs2_reflink_xattr_inline()
6546 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_create_empty_xattr_block() local
6550 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac); in ocfs2_create_empty_xattr_block()
6556 ctxt.handle = ocfs2_start_trans(osb, OCFS2_XATTR_BLOCK_CREATE_CREDITS); in ocfs2_create_empty_xattr_block()
6570 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_create_empty_xattr_block()
6584 struct ocfs2_super *osb = OCFS2_SB(args->new_inode->i_sb); in ocfs2_reflink_xattr_block() local
6598 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, in ocfs2_reflink_xattr_block()
6606 handle = ocfs2_start_trans(osb, credits + 1); in ocfs2_reflink_xattr_block()
6632 osb->sb->s_blocksize - header_off); in ocfs2_reflink_xattr_block()
6655 ocfs2_commit_trans(osb, handle); in ocfs2_reflink_xattr_block()
6750 struct ocfs2_super *osb = OCFS2_SB(args->reflink->old_inode->i_sb); in ocfs2_lock_reflink_xattr_rec_allocators() local
6777 (metas.num_recs + ocfs2_refcount_recs_per_rb(osb->sb) - 1) / in ocfs2_lock_reflink_xattr_rec_allocators()
6778 ocfs2_refcount_recs_per_rb(osb->sb) * 2; in ocfs2_lock_reflink_xattr_rec_allocators()
6789 num_free_extents = ocfs2_num_free_extents(osb, xt_et); in ocfs2_lock_reflink_xattr_rec_allocators()
6799 *credits += ocfs2_calc_extend_credits(osb->sb, in ocfs2_lock_reflink_xattr_rec_allocators()
6803 ret = ocfs2_reserve_new_metadata_blocks(osb, metas.num_metas, in ocfs2_lock_reflink_xattr_rec_allocators()
6812 ret = ocfs2_reserve_clusters(osb, len, data_ac); in ocfs2_lock_reflink_xattr_rec_allocators()
7000 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_reflink_xattr_rec() local
7019 handle = ocfs2_start_trans(osb, credits); in ocfs2_reflink_xattr_rec()
7032 ocfs2_commit_trans(osb, handle); in ocfs2_reflink_xattr_rec()
7376 struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); in ocfs2_xattr_user_list() local
7378 if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) in ocfs2_xattr_user_list()
7392 struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); in ocfs2_xattr_user_get() local
7396 if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) in ocfs2_xattr_user_get()
7405 struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); in ocfs2_xattr_user_set() local
7409 if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) in ocfs2_xattr_user_set()