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()
594 struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); in ocfs2_calc_security_init() local
605 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, xattr_ac); in ocfs2_calc_security_init()
634 struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); in ocfs2_calc_xattr_init() local
641 if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) { in ocfs2_calc_xattr_init()
671 (S_ISDIR(mode) && ocfs2_supports_inline_data(osb)) || in ocfs2_calc_xattr_init()
694 if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL && in ocfs2_calc_xattr_init()
2352 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_remove_value_outside() local
2374 ctxt.handle = ocfs2_start_trans(osb, ref_credits + in ocfs2_remove_value_outside()
2375 ocfs2_remove_extent_credits(osb->sb)); in ocfs2_remove_value_outside()
2384 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_remove_value_outside()
2399 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_remove_value_outside()
2400 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_remove_value_outside()
2472 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_xattr_free_block() local
2498 xb_alloc_inode = ocfs2_get_system_file_inode(osb, in ocfs2_xattr_free_block()
2514 handle = ocfs2_start_trans(osb, OCFS2_SUBALLOC_FREE); in ocfs2_xattr_free_block()
2526 ocfs2_commit_trans(osb, handle); in ocfs2_xattr_free_block()
2706 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_xattr_ibody_init() local
2707 unsigned int xattrsize = osb->s_xattr_inline_size; in ocfs2_xattr_ibody_init()
3240 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_init_xattr_set_ctxt() local
3258 ret = ocfs2_reserve_new_metadata_blocks(osb, meta_add, in ocfs2_init_xattr_set_ctxt()
3267 ret = ocfs2_reserve_clusters(osb, clusters_add, &ctxt->data_ac); in ocfs2_init_xattr_set_ctxt()
3520 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_xattr_set() local
3521 struct inode *tl_inode = osb->osb_tl_inode; in ocfs2_xattr_set()
3603 if (ocfs2_truncate_log_needs_flush(osb)) { in ocfs2_xattr_set()
3604 ret = __ocfs2_flush_truncate_log(osb); in ocfs2_xattr_set()
3622 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_xattr_set()
3632 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_xattr_set()
3640 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_xattr_set()
3641 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_xattr_set()
3645 ocfs2_unlock_refcount_tree(osb, ref_tree, 1); in ocfs2_xattr_set()
4868 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_mv_xattr_buckets() local
4870 int num_buckets = ocfs2_xattr_buckets_per_cluster(osb); in ocfs2_mv_xattr_buckets()
5096 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_add_new_xattr_cluster() local
5123 block = ocfs2_clusters_to_blocks(osb->sb, bit_off); in ocfs2_add_new_xattr_cluster()
5127 (prev_clusters + num_bits) << osb->s_clustersize_bits <= in ocfs2_add_new_xattr_cluster()
5186 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_extend_xattr_bucket() local
5197 (num_clusters * ocfs2_xattr_buckets_per_cluster(osb))); in ocfs2_extend_xattr_bucket()
5266 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_add_new_xattr_bucket() local
5297 num_buckets = ocfs2_xattr_buckets_per_cluster(osb) * num_clusters; in ocfs2_add_new_xattr_bucket()
5411 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_rm_xattr_cluster() local
5412 struct inode *tl_inode = osb->osb_tl_inode; in ocfs2_rm_xattr_cluster()
5446 if (ocfs2_truncate_log_needs_flush(osb)) { in ocfs2_rm_xattr_cluster()
5447 ret = __ocfs2_flush_truncate_log(osb); in ocfs2_rm_xattr_cluster()
5454 handle = ocfs2_start_trans(osb, ocfs2_remove_extent_credits(osb->sb)); in ocfs2_rm_xattr_cluster()
5478 ret = ocfs2_truncate_log_append(osb, handle, blkno, len); in ocfs2_rm_xattr_cluster()
5484 ocfs2_commit_trans(osb, handle); in ocfs2_rm_xattr_cluster()
5486 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_rm_xattr_cluster()
5493 ocfs2_run_deallocs(osb, &dealloc); in ocfs2_rm_xattr_cluster()
5647 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_delete_xattr_in_bucket() local
5649 int credits = ocfs2_remove_extent_credits(osb->sb) + in ocfs2_delete_xattr_in_bucket()
5675 ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); in ocfs2_delete_xattr_in_bucket()
5685 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_delete_xattr_in_bucket()
5698 ocfs2_schedule_truncate_log_flush(osb, 1); in ocfs2_delete_xattr_in_bucket()
5699 ocfs2_run_deallocs(osb, &ctxt.dealloc); in ocfs2_delete_xattr_in_bucket()
5763 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_prepare_refcount_xattr() local
5796 if (ocfs2_meta_ecc(osb)) { in ocfs2_prepare_refcount_xattr()
5834 ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc), in ocfs2_prepare_refcount_xattr()
6268 static int ocfs2_reflink_lock_xattr_allocators(struct ocfs2_super *osb, in ocfs2_reflink_lock_xattr_allocators() argument
6280 ret = ocfs2_value_metas_in_xattr_header(osb->sb, NULL, xh, in ocfs2_reflink_lock_xattr_allocators()
6296 num_recs = num_recs / ocfs2_refcount_recs_per_rb(osb->sb) * 2; in ocfs2_reflink_lock_xattr_allocators()
6305 ret = ocfs2_reserve_new_metadata_blocks(osb, meta_add, meta_ac); in ocfs2_reflink_lock_xattr_allocators()
6454 struct ocfs2_super *osb = OCFS2_SB(args->old_inode->i_sb); in ocfs2_reflink_xattr_inline() local
6457 int header_off = osb->sb->s_blocksize - inline_size; in ocfs2_reflink_xattr_inline()
6470 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, in ocfs2_reflink_xattr_inline()
6477 handle = ocfs2_start_trans(osb, credits); in ocfs2_reflink_xattr_inline()
6524 ocfs2_commit_trans(osb, handle); in ocfs2_reflink_xattr_inline()
6538 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_create_empty_xattr_block() local
6542 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac); in ocfs2_create_empty_xattr_block()
6548 ctxt.handle = ocfs2_start_trans(osb, OCFS2_XATTR_BLOCK_CREATE_CREDITS); in ocfs2_create_empty_xattr_block()
6562 ocfs2_commit_trans(osb, ctxt.handle); in ocfs2_create_empty_xattr_block()
6576 struct ocfs2_super *osb = OCFS2_SB(args->new_inode->i_sb); in ocfs2_reflink_xattr_block() local
6590 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, in ocfs2_reflink_xattr_block()
6598 handle = ocfs2_start_trans(osb, credits + 1); in ocfs2_reflink_xattr_block()
6624 osb->sb->s_blocksize - header_off); in ocfs2_reflink_xattr_block()
6647 ocfs2_commit_trans(osb, handle); in ocfs2_reflink_xattr_block()
6742 struct ocfs2_super *osb = OCFS2_SB(args->reflink->old_inode->i_sb); in ocfs2_lock_reflink_xattr_rec_allocators() local
6769 (metas.num_recs + ocfs2_refcount_recs_per_rb(osb->sb) - 1) / in ocfs2_lock_reflink_xattr_rec_allocators()
6770 ocfs2_refcount_recs_per_rb(osb->sb) * 2; in ocfs2_lock_reflink_xattr_rec_allocators()
6781 num_free_extents = ocfs2_num_free_extents(osb, xt_et); in ocfs2_lock_reflink_xattr_rec_allocators()
6791 *credits += ocfs2_calc_extend_credits(osb->sb, in ocfs2_lock_reflink_xattr_rec_allocators()
6795 ret = ocfs2_reserve_new_metadata_blocks(osb, metas.num_metas, in ocfs2_lock_reflink_xattr_rec_allocators()
6804 ret = ocfs2_reserve_clusters(osb, len, data_ac); in ocfs2_lock_reflink_xattr_rec_allocators()
6992 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_reflink_xattr_rec() local
7011 handle = ocfs2_start_trans(osb, credits); in ocfs2_reflink_xattr_rec()
7024 ocfs2_commit_trans(osb, handle); in ocfs2_reflink_xattr_rec()
7378 struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); in ocfs2_xattr_user_list() local
7380 if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) in ocfs2_xattr_user_list()
7395 struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); in ocfs2_xattr_user_get() local
7399 if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) in ocfs2_xattr_user_get()
7409 struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); in ocfs2_xattr_user_set() local
7413 if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) in ocfs2_xattr_user_set()