Lines Matching full:bucket
60 /* The actual buffers that make up the bucket */
63 /* How many blocks make up one bucket for this filesystem */
121 struct ocfs2_xattr_bucket *bucket; member
275 struct ocfs2_xattr_bucket *bucket,
297 struct ocfs2_xattr_bucket *bucket,
318 struct ocfs2_xattr_bucket *bucket; in ocfs2_xattr_bucket_new() local
323 bucket = kzalloc(sizeof(struct ocfs2_xattr_bucket), GFP_NOFS); in ocfs2_xattr_bucket_new()
324 if (bucket) { in ocfs2_xattr_bucket_new()
325 bucket->bu_inode = inode; in ocfs2_xattr_bucket_new()
326 bucket->bu_blocks = blks; in ocfs2_xattr_bucket_new()
329 return bucket; in ocfs2_xattr_bucket_new()
332 static void ocfs2_xattr_bucket_relse(struct ocfs2_xattr_bucket *bucket) in ocfs2_xattr_bucket_relse() argument
336 for (i = 0; i < bucket->bu_blocks; i++) { in ocfs2_xattr_bucket_relse()
337 brelse(bucket->bu_bhs[i]); in ocfs2_xattr_bucket_relse()
338 bucket->bu_bhs[i] = NULL; in ocfs2_xattr_bucket_relse()
342 static void ocfs2_xattr_bucket_free(struct ocfs2_xattr_bucket *bucket) in ocfs2_xattr_bucket_free() argument
344 if (bucket) { in ocfs2_xattr_bucket_free()
345 ocfs2_xattr_bucket_relse(bucket); in ocfs2_xattr_bucket_free()
346 bucket->bu_inode = NULL; in ocfs2_xattr_bucket_free()
347 kfree(bucket); in ocfs2_xattr_bucket_free()
352 * A bucket that has never been written to disk doesn't need to be
357 static int ocfs2_init_xattr_bucket(struct ocfs2_xattr_bucket *bucket, in ocfs2_init_xattr_bucket() argument
362 for (i = 0; i < bucket->bu_blocks; i++) { in ocfs2_init_xattr_bucket()
363 bucket->bu_bhs[i] = sb_getblk(bucket->bu_inode->i_sb, in ocfs2_init_xattr_bucket()
365 if (!bucket->bu_bhs[i]) { in ocfs2_init_xattr_bucket()
371 if (!ocfs2_buffer_uptodate(INODE_CACHE(bucket->bu_inode), in ocfs2_init_xattr_bucket()
372 bucket->bu_bhs[i])) { in ocfs2_init_xattr_bucket()
374 ocfs2_set_new_buffer_uptodate(INODE_CACHE(bucket->bu_inode), in ocfs2_init_xattr_bucket()
375 bucket->bu_bhs[i]); in ocfs2_init_xattr_bucket()
377 set_buffer_uptodate(bucket->bu_bhs[i]); in ocfs2_init_xattr_bucket()
378 ocfs2_set_buffer_uptodate(INODE_CACHE(bucket->bu_inode), in ocfs2_init_xattr_bucket()
379 bucket->bu_bhs[i]); in ocfs2_init_xattr_bucket()
385 ocfs2_xattr_bucket_relse(bucket); in ocfs2_init_xattr_bucket()
389 /* Read the xattr bucket at xb_blkno */
390 static int ocfs2_read_xattr_bucket(struct ocfs2_xattr_bucket *bucket, in ocfs2_read_xattr_bucket() argument
395 rc = ocfs2_read_blocks(INODE_CACHE(bucket->bu_inode), xb_blkno, in ocfs2_read_xattr_bucket()
396 bucket->bu_blocks, bucket->bu_bhs, 0, in ocfs2_read_xattr_bucket()
399 spin_lock(&OCFS2_SB(bucket->bu_inode->i_sb)->osb_xattr_lock); in ocfs2_read_xattr_bucket()
400 rc = ocfs2_validate_meta_ecc_bhs(bucket->bu_inode->i_sb, in ocfs2_read_xattr_bucket()
401 bucket->bu_bhs, in ocfs2_read_xattr_bucket()
402 bucket->bu_blocks, in ocfs2_read_xattr_bucket()
403 &bucket_xh(bucket)->xh_check); in ocfs2_read_xattr_bucket()
404 spin_unlock(&OCFS2_SB(bucket->bu_inode->i_sb)->osb_xattr_lock); in ocfs2_read_xattr_bucket()
410 ocfs2_xattr_bucket_relse(bucket); in ocfs2_read_xattr_bucket()
415 struct ocfs2_xattr_bucket *bucket, in ocfs2_xattr_bucket_journal_access() argument
420 for (i = 0; i < bucket->bu_blocks; i++) { in ocfs2_xattr_bucket_journal_access()
422 INODE_CACHE(bucket->bu_inode), in ocfs2_xattr_bucket_journal_access()
423 bucket->bu_bhs[i], type); in ocfs2_xattr_bucket_journal_access()
434 struct ocfs2_xattr_bucket *bucket) in ocfs2_xattr_bucket_journal_dirty() argument
438 spin_lock(&OCFS2_SB(bucket->bu_inode->i_sb)->osb_xattr_lock); in ocfs2_xattr_bucket_journal_dirty()
439 ocfs2_compute_meta_ecc_bhs(bucket->bu_inode->i_sb, in ocfs2_xattr_bucket_journal_dirty()
440 bucket->bu_bhs, bucket->bu_blocks, in ocfs2_xattr_bucket_journal_dirty()
441 &bucket_xh(bucket)->xh_check); in ocfs2_xattr_bucket_journal_dirty()
442 spin_unlock(&OCFS2_SB(bucket->bu_inode->i_sb)->osb_xattr_lock); in ocfs2_xattr_bucket_journal_dirty()
444 for (i = 0; i < bucket->bu_blocks; i++) in ocfs2_xattr_bucket_journal_dirty()
445 ocfs2_journal_dirty(handle, bucket->bu_bhs[i]); in ocfs2_xattr_bucket_journal_dirty()
652 * xattr bucket, otherwise reserve one metadata block in ocfs2_calc_xattr_init()
1219 xs->bucket = ocfs2_xattr_bucket_new(inode); in ocfs2_xattr_block_get()
1220 if (!xs->bucket) { in ocfs2_xattr_block_get()
1250 bucket_xh(xs->bucket), in ocfs2_xattr_block_get()
1258 xs->base = bucket_block(xs->bucket, block_off); in ocfs2_xattr_block_get()
1276 ocfs2_xattr_bucket_free(xs->bucket); in ocfs2_xattr_block_get()
1710 struct ocfs2_xattr_bucket *bucket = loc->xl_storage; in ocfs2_xa_bucket_journal_access() local
1712 return ocfs2_xattr_bucket_journal_access(handle, bucket, type); in ocfs2_xa_bucket_journal_access()
1718 struct ocfs2_xattr_bucket *bucket = loc->xl_storage; in ocfs2_xa_bucket_journal_dirty() local
1720 ocfs2_xattr_bucket_journal_dirty(handle, bucket); in ocfs2_xa_bucket_journal_dirty()
1726 struct ocfs2_xattr_bucket *bucket = loc->xl_storage; in ocfs2_xa_bucket_offset_pointer() local
1729 /* The header is at the front of the bucket */ in ocfs2_xa_bucket_offset_pointer()
1733 return bucket_block(bucket, block) + block_offset; in ocfs2_xa_bucket_offset_pointer()
1745 struct ocfs2_xattr_bucket *bucket = loc->xl_storage; in ocfs2_xa_bucket_get_free_start() local
1746 return le16_to_cpu(bucket_xh(bucket)->xh_free_start); in ocfs2_xa_bucket_get_free_start()
1774 * Bucket storage does not reclaim name+value pairs it cannot in ocfs2_xa_bucket_check_space()
1775 * reuse. They live as holes until the bucket fills, and then in ocfs2_xa_bucket_check_space()
1776 * the bucket is defragmented. However, the bucket can reclaim in ocfs2_xa_bucket_check_space()
1867 struct ocfs2_xattr_bucket *bucket = loc->xl_storage; in ocfs2_xa_bucket_fill_value_buf() local
1876 /* We expect the bucket to be filled in */ in ocfs2_xa_bucket_fill_value_buf()
1877 BUG_ON(!bucket->bu_bhs[block_offset]); in ocfs2_xa_bucket_fill_value_buf()
1880 vb->vb_bh = bucket->bu_bhs[block_offset]; in ocfs2_xa_bucket_fill_value_buf()
1922 * transaction and open a new one. If this is a bucket, truncate in ocfs2_xa_value_truncate()
1924 * the caller is expecting to dirty the entire bucket. So we must in ocfs2_xa_value_truncate()
1949 * important for an empty bucket, as it keeps track of the in ocfs2_xa_remove_entry()
1950 * bucket's hash value. It doesn't hurt empty block storage. in ocfs2_xa_remove_entry()
2308 struct ocfs2_xattr_bucket *bucket, in ocfs2_init_xattr_bucket_xa_loc() argument
2311 loc->xl_inode = bucket->bu_inode; in ocfs2_init_xattr_bucket_xa_loc()
2313 loc->xl_storage = bucket; in ocfs2_init_xattr_bucket_xa_loc()
2314 loc->xl_header = bucket_xh(bucket); in ocfs2_init_xattr_bucket_xa_loc()
3096 bucket_xh(xbs->bucket), in ocfs2_calc_xattr_set_need()
3099 base = bucket_block(xbs->bucket, block_off); in ocfs2_calc_xattr_set_need()
3214 * This cluster will be used either for new bucket or for in ocfs2_calc_xattr_set_need()
3216 * If the cluster size is the same as the bucket size, one in ocfs2_calc_xattr_set_need()
3217 * more is needed since we may need to extend the bucket in ocfs2_calc_xattr_set_need()
3486 * In extreme situation, may need xattr bucket when in ocfs2_xattr_set_handle()
3488 * the credits for bucket in mknod. in ocfs2_xattr_set_handle()
3491 xbs.bucket = ocfs2_xattr_bucket_new(inode); in ocfs2_xattr_set_handle()
3492 if (!xbs.bucket) { in ocfs2_xattr_set_handle()
3517 ocfs2_xattr_bucket_free(xbs.bucket); in ocfs2_xattr_set_handle()
3566 * bucket. in ocfs2_xattr_set()
3568 xbs.bucket = ocfs2_xattr_bucket_new(inode); in ocfs2_xattr_set()
3569 if (!xbs.bucket) { in ocfs2_xattr_set()
3677 ocfs2_xattr_bucket_free(xbs.bucket); in ocfs2_xattr_set()
3747 struct ocfs2_xattr_bucket *bucket,
3751 struct ocfs2_xattr_bucket *bucket, in ocfs2_find_xe_in_bucket() argument
3759 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_find_xe_in_bucket()
3765 * We don't use binary search in the bucket because there in ocfs2_find_xe_in_bucket()
3793 xe_name = bucket_block(bucket, block_off) + new_offset; in ocfs2_find_xe_in_bucket()
3808 * The ocfs2_xattr_header.xh_num_buckets of the first bucket contains
3812 * hash is in the gap of 2 buckets, return the lower bucket.
3828 int low_bucket = 0, bucket, high_bucket; in ocfs2_xattr_bucket_find() local
3850 bucket = (low_bucket + high_bucket) / 2; in ocfs2_xattr_bucket_find()
3851 blkno = p_blkno + bucket * blk_per_bucket; in ocfs2_xattr_bucket_find()
3861 high_bucket = bucket - 1; in ocfs2_xattr_bucket_find()
3867 * bucket is larger than the search one. for an empty in ocfs2_xattr_bucket_find()
3868 * bucket, the last one is also the first one. in ocfs2_xattr_bucket_find()
3877 low_bucket = bucket + 1; in ocfs2_xattr_bucket_find()
3881 /* the searched xattr should reside in this bucket if exists. */ in ocfs2_xattr_bucket_find()
3893 * Record the bucket we have found. in ocfs2_xattr_bucket_find()
3895 * always set it to the previous bucket. in ocfs2_xattr_bucket_find()
3901 ret = ocfs2_read_xattr_bucket(xs->bucket, lower_blkno); in ocfs2_xattr_bucket_find()
3907 xs->header = bucket_xh(xs->bucket); in ocfs2_xattr_bucket_find()
3908 xs->base = bucket_block(xs->bucket, 0); in ocfs2_xattr_bucket_find()
3915 (unsigned long long)bucket_blkno(xs->bucket), in ocfs2_xattr_bucket_find()
3978 struct ocfs2_xattr_bucket *bucket; in ocfs2_iterate_xattr_buckets() local
3980 bucket = ocfs2_xattr_bucket_new(inode); in ocfs2_iterate_xattr_buckets()
3981 if (!bucket) { in ocfs2_iterate_xattr_buckets()
3990 for (i = 0; i < num_buckets; i++, blkno += bucket->bu_blocks) { in ocfs2_iterate_xattr_buckets()
3991 ret = ocfs2_read_xattr_bucket(bucket, blkno); in ocfs2_iterate_xattr_buckets()
3998 * The real bucket num in this series of blocks is stored in ocfs2_iterate_xattr_buckets()
3999 * in the 1st bucket. in ocfs2_iterate_xattr_buckets()
4002 num_buckets = le16_to_cpu(bucket_xh(bucket)->xh_num_buckets); in ocfs2_iterate_xattr_buckets()
4005 le32_to_cpu(bucket_xh(bucket)->xh_entries[0].xe_name_hash)); in ocfs2_iterate_xattr_buckets()
4007 ret = func(inode, bucket, para); in ocfs2_iterate_xattr_buckets()
4013 ocfs2_xattr_bucket_relse(bucket); in ocfs2_iterate_xattr_buckets()
4018 ocfs2_xattr_bucket_free(bucket); in ocfs2_iterate_xattr_buckets()
4048 struct ocfs2_xattr_bucket *bucket, in ocfs2_list_xattr_bucket() argument
4056 for (i = 0 ; i < le16_to_cpu(bucket_xh(bucket)->xh_count); i++) { in ocfs2_list_xattr_bucket()
4057 struct ocfs2_xattr_entry *entry = &bucket_xh(bucket)->xh_entries[i]; in ocfs2_list_xattr_bucket()
4061 bucket_xh(bucket), in ocfs2_list_xattr_bucket()
4068 name = (const char *)bucket_block(bucket, block_off) + in ocfs2_list_xattr_bucket()
4170 * When the ocfs2_xattr_block is filled up, new bucket will be created
4171 * and all the xattr entries will be moved to the new bucket.
4172 * The header goes at the start of the bucket, and the names+values are
4179 struct ocfs2_xattr_bucket *bucket) in ocfs2_cp_xattr_block_to_bucket() argument
4188 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_cp_xattr_block_to_bucket()
4191 char *target = bucket_block(bucket, blks - 1); in ocfs2_cp_xattr_block_to_bucket()
4195 (unsigned long long)bucket_blkno(bucket)); in ocfs2_cp_xattr_block_to_bucket()
4198 memset(bucket_block(bucket, i), 0, blocksize); in ocfs2_cp_xattr_block_to_bucket()
4220 target = bucket_block(bucket, 0); in ocfs2_cp_xattr_block_to_bucket()
4242 * While if the entry is in index b-tree, "bucket" indicates the
4254 xs->header = bucket_xh(xs->bucket); in ocfs2_xattr_update_xattr_search()
4255 xs->base = bucket_block(xs->bucket, 0); in ocfs2_xattr_update_xattr_search()
4284 BUG_ON(!xs->bucket); in ocfs2_xattr_create_index_block()
4308 * The bucket may spread in many blocks, and in ocfs2_xattr_create_index_block()
4310 * in the whole bucket(one for entry and one for data). in ocfs2_xattr_create_index_block()
4316 ret = ocfs2_init_xattr_bucket(xs->bucket, blkno, 1); in ocfs2_xattr_create_index_block()
4322 ret = ocfs2_xattr_bucket_journal_access(handle, xs->bucket, in ocfs2_xattr_create_index_block()
4329 ocfs2_cp_xattr_block_to_bucket(inode, xb_bh, xs->bucket); in ocfs2_xattr_create_index_block()
4330 ocfs2_xattr_bucket_journal_dirty(handle, xs->bucket); in ocfs2_xattr_create_index_block()
4373 * defrag a xattr bucket if we find that the bucket has some
4375 * We will move all the name/value pairs to the end of the bucket
4380 struct ocfs2_xattr_bucket *bucket) in ocfs2_defrag_xattr_bucket() argument
4386 u64 blkno = bucket_blkno(bucket); in ocfs2_defrag_xattr_bucket()
4404 for (i = 0; i < bucket->bu_blocks; i++, buf += blocksize) in ocfs2_defrag_xattr_bucket()
4405 memcpy(buf, bucket_block(bucket, i), blocksize); in ocfs2_defrag_xattr_bucket()
4407 ret = ocfs2_xattr_bucket_journal_access(handle, bucket, in ocfs2_defrag_xattr_bucket()
4431 /* Move all name/values to the end of the bucket. */ in ocfs2_defrag_xattr_bucket()
4454 "bucket %llu\n", (unsigned long long)blkno); in ocfs2_defrag_xattr_bucket()
4460 "bucket %llu\n", (unsigned long long)blkno); in ocfs2_defrag_xattr_bucket()
4474 for (i = 0; i < bucket->bu_blocks; i++, buf += blocksize) in ocfs2_defrag_xattr_bucket()
4475 memcpy(bucket_block(bucket, i), buf, blocksize); in ocfs2_defrag_xattr_bucket()
4476 ocfs2_xattr_bucket_journal_dirty(handle, bucket); in ocfs2_defrag_xattr_bucket()
4486 * clusters contains more than bucket, we can easily split one cluster
4487 * at a bucket boundary. So we take the last cluster of the existing
4493 * extent's bucket count. header_bh is the bucket were we were hoping
4494 * to insert our xattr. If the bucket move places the target in the new
4532 /* This is the first bucket that got moved */ in ocfs2_mv_xattr_bucket_cross_cluster()
4536 * If the target bucket was part of the moved buckets, we need to in ocfs2_mv_xattr_bucket_cross_cluster()
4540 /* Find the block for the new target bucket */ in ocfs2_mv_xattr_bucket_cross_cluster()
4567 * Find the suitable pos when we divide a bucket into 2.
4569 * in the same bucket.
4609 * Move some xattrs in old bucket(blk) to new bucket(new_blk).
4610 * first_hash will record the 1st hash of the new bucket.
4614 * same bucket. If all the xattrs in this bucket have the same hash
4615 * value, the new bucket will be initialized as an empty one and the
4688 * initialized a new empty bucket here. in ocfs2_divide_xattr_bucket()
4690 * that of the last entry in the previous bucket. in ocfs2_divide_xattr_bucket()
4703 /* copy the whole bucket to the new first. */ in ocfs2_divide_xattr_bucket()
4706 /* update the new bucket. */ in ocfs2_divide_xattr_bucket()
4711 * the old bucket first. in ocfs2_divide_xattr_bucket()
4723 * Now begin the modification to the new bucket. in ocfs2_divide_xattr_bucket()
4725 * In the new bucket, We just move the xattr entry to the beginning in ocfs2_divide_xattr_bucket()
4727 * bucket, and they will be removed when ocfs2_defrag_xattr_bucket is in ocfs2_divide_xattr_bucket()
4743 /* Calculate xh_free_start for the new bucket. */ in ocfs2_divide_xattr_bucket()
4761 /* store the first_hash of the new bucket. */ in ocfs2_divide_xattr_bucket()
4766 * Now only update the 1st block of the old bucket. If we in ocfs2_divide_xattr_bucket()
4767 * just added a new empty bucket, there is no need to modify in ocfs2_divide_xattr_bucket()
4790 * Copy xattr from one bucket to another bucket.
4841 * how we get here, and the bucket isn't really new. in ocfs2_cp_xattr_bucket()
4889 /* The first bucket of the original extent */ in ocfs2_mv_xattr_buckets()
4891 /* The first bucket of the new extent */ in ocfs2_mv_xattr_buckets()
4906 * We need to update the first bucket of the old extent and all in ocfs2_mv_xattr_buckets()
4935 * Get the new bucket ready before we dirty anything in ocfs2_mv_xattr_buckets()
4969 * This function should only be called when bucket size == cluster size.
4989 /* Move half of the xattr in start_blk to the next bucket. */ in ocfs2_divide_xattr_cluster()
5003 * to extend the insert bucket.
5007 * 1. If cluster size > bucket size, that means the previous cluster has more
5008 * than 1 bucket, so just move half nums of bucket into the new cluster and
5009 * update the first_bh and header_bh if the insert bucket has been moved
5085 * indicates the bucket we will insert the new xattrs. They will be updated
5178 * We are given an extent. 'first' is the bucket at the very front of
5179 * the extent. The extent has space for an additional bucket past
5181 * of the target bucket. We wish to shift every bucket past the target
5183 * target, we split the target between itself and the now-empty bucket
5202 /* The extent must have room for an additional bucket */ in ocfs2_extend_xattr_bucket()
5206 /* end_blk points to the last existing bucket */ in ocfs2_extend_xattr_bucket()
5210 * end_blk is the start of the last existing bucket. in ocfs2_extend_xattr_bucket()
5211 * Thus, (end_blk - target_blk) covers the target bucket and in ocfs2_extend_xattr_bucket()
5212 * every bucket after it up to, but not including, the last in ocfs2_extend_xattr_bucket()
5213 * existing bucket. Then we add the last existing bucket, the in ocfs2_extend_xattr_bucket()
5214 * new bucket, and the first bucket (3 * blk_per_bucket). in ocfs2_extend_xattr_bucket()
5238 /* Move half of the xattr in target_blkno to the next bucket. */ in ocfs2_extend_xattr_bucket()
5250 * Add new xattr bucket in an extent record and adjust the buckets
5252 * bucket we want to insert into.
5255 * one. Half of target's xattrs will be moved to the next bucket.
5277 /* The bucket at the front of the extent */ in ocfs2_add_new_xattr_bucket()
5283 /* The first bucket of the original extent */ in ocfs2_add_new_xattr_bucket()
5307 * This can move first+target if the target bucket moves in ocfs2_add_new_xattr_bucket()
5341 * Truncate the specified xe_off entry in xattr bucket.
5342 * bucket is indicated by header_bh and len is the new length.
5348 struct ocfs2_xattr_bucket *bucket, in ocfs2_xattr_bucket_value_truncate() argument
5356 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_xattr_bucket_value_truncate()
5374 vb.vb_bh = bucket->bu_bhs[value_blk]; in ocfs2_xattr_bucket_value_truncate()
5381 * From here on out we have to dirty the bucket. The generic in ocfs2_xattr_bucket_value_truncate()
5382 * value calls only modify one of the bucket's bhs, but we need in ocfs2_xattr_bucket_value_truncate()
5383 * to send the bucket at once. So if they error, they *could* have in ocfs2_xattr_bucket_value_truncate()
5385 * the whole bucket. This leaves us in a consistent state. in ocfs2_xattr_bucket_value_truncate()
5388 (unsigned long long)bucket_blkno(bucket), xe_off, len); in ocfs2_xattr_bucket_value_truncate()
5395 ret = ocfs2_xattr_bucket_journal_access(ctxt->handle, bucket, in ocfs2_xattr_bucket_value_truncate()
5404 ocfs2_xattr_bucket_journal_dirty(ctxt->handle, bucket); in ocfs2_xattr_bucket_value_truncate()
5506 * check whether the xattr bucket is filled up with the same hash value.
5512 struct ocfs2_xattr_bucket *bucket, in ocfs2_check_xattr_bucket_collision() argument
5515 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_check_xattr_bucket_collision()
5523 mlog(ML_ERROR, "Too much hash collision in xattr bucket %llu, " in ocfs2_check_xattr_bucket_collision()
5525 (unsigned long long)bucket_blkno(bucket), in ocfs2_check_xattr_bucket_collision()
5534 * Try to set the entry in the current bucket. If we fail, the caller
5535 * will handle getting us another bucket.
5547 ocfs2_init_xattr_bucket_xa_loc(&loc, xs->bucket, in ocfs2_xattr_set_entry_bucket()
5559 /* Ok, we need space. Let's try defragmenting the bucket. */ in ocfs2_xattr_set_entry_bucket()
5561 xs->bucket); in ocfs2_xattr_set_entry_bucket()
5597 /* Ack, need more space. Let's try to get another bucket! */ in ocfs2_xattr_set_entry_index_block()
5602 * one bucket's worth, so check it here whether we need to in ocfs2_xattr_set_entry_index_block()
5603 * add a new bucket for the insert. in ocfs2_xattr_set_entry_index_block()
5606 xs->bucket, in ocfs2_xattr_set_entry_index_block()
5615 xs->bucket, in ocfs2_xattr_set_entry_index_block()
5624 * xs->bucket if it moved, but it will not have updated in ocfs2_xattr_set_entry_index_block()
5629 ocfs2_xattr_bucket_relse(xs->bucket); in ocfs2_xattr_set_entry_index_block()
5637 /* Ok, we have a new bucket, let's try again */ in ocfs2_xattr_set_entry_index_block()
5647 struct ocfs2_xattr_bucket *bucket, in ocfs2_delete_xattr_in_bucket() argument
5651 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_delete_xattr_in_bucket()
5669 ret = ocfs2_get_xattr_tree_value_root(inode->i_sb, bucket, in ocfs2_delete_xattr_in_bucket()
5689 ret = ocfs2_xattr_bucket_value_truncate(inode, bucket, in ocfs2_delete_xattr_in_bucket()
5711 * Whenever we modify a xattr value root in the bucket(e.g, CoW
5713 * the metaecc for the whole bucket. So it is done here.
5723 struct ocfs2_xattr_bucket *bucket = in ocfs2_xattr_bucket_post_refcount() local
5726 ret = ocfs2_xattr_bucket_journal_access(handle, bucket, in ocfs2_xattr_bucket_post_refcount()
5733 ocfs2_xattr_bucket_journal_dirty(handle, bucket); in ocfs2_xattr_bucket_post_refcount()
5769 struct ocfs2_xattr_bucket *bucket = NULL; in ocfs2_prepare_refcount_xattr() local
5792 bucket_xh(xbs->bucket), in ocfs2_prepare_refcount_xattr()
5799 base = bucket_block(xbs->bucket, block_off); in ocfs2_prepare_refcount_xattr()
5800 vb.vb_bh = xbs->bucket->bu_bhs[block_off]; in ocfs2_prepare_refcount_xattr()
5805 bucket = xbs->bucket; in ocfs2_prepare_refcount_xattr()
5806 refcount.credits = bucket->bu_blocks; in ocfs2_prepare_refcount_xattr()
5807 refcount.para = bucket; in ocfs2_prepare_refcount_xattr()
5994 struct ocfs2_xattr_bucket *bucket, in ocfs2_get_xattr_tree_value_root() argument
6000 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_get_xattr_tree_value_root()
6005 bucket_xh(bucket), in ocfs2_get_xattr_tree_value_root()
6014 base = bucket_block(bucket, block_off); in ocfs2_get_xattr_tree_value_root()
6020 *bh = bucket->bu_bhs[block_off]; in ocfs2_get_xattr_tree_value_root()
6026 * For a given xattr bucket, refcount all the entries which
6030 struct ocfs2_xattr_bucket *bucket, in ocfs2_xattr_bucket_value_refcount() argument
6038 (struct ocfs2_xattr_header *)bucket->bu_bhs[0]->b_data; in ocfs2_xattr_bucket_value_refcount()
6044 .credits = bucket->bu_blocks, in ocfs2_xattr_bucket_value_refcount()
6045 .para = bucket, in ocfs2_xattr_bucket_value_refcount()
6055 (unsigned long long)bucket_blkno(bucket), in ocfs2_xattr_bucket_value_refcount()
6063 ret = ocfs2_get_xattr_tree_value_root(inode->i_sb, bucket, i, in ocfs2_xattr_bucket_value_refcount()
6322 * It can be used for inode, block and bucket.
6662 * We have to handle the case that both old bucket and new bucket
6676 struct ocfs2_xattr_bucket *bucket; in ocfs2_get_reflink_xattr_value_root() local
6679 bucket = args->old_bucket; in ocfs2_get_reflink_xattr_value_root()
6681 bucket = args->new_bucket; in ocfs2_get_reflink_xattr_value_root()
6683 return ocfs2_get_xattr_tree_value_root(sb, bucket, offset, in ocfs2_get_reflink_xattr_value_root()
6701 struct ocfs2_xattr_bucket *bucket = in ocfs2_value_tree_metas_in_bucket() local
6704 return ocfs2_get_xattr_tree_value_root(sb, bucket, offset, in ocfs2_value_tree_metas_in_bucket()
6709 struct ocfs2_xattr_bucket *bucket, in ocfs2_calc_value_tree_metas() argument
6715 (struct ocfs2_xattr_header *)bucket->bu_bhs[0]->b_data; in ocfs2_calc_value_tree_metas()
6717 /* Add the credits for this bucket first. */ in ocfs2_calc_value_tree_metas()
6718 metas->credits += bucket->bu_blocks; in ocfs2_calc_value_tree_metas()
6719 return ocfs2_value_metas_in_xattr_header(inode->i_sb, bucket->bu_bhs[0], in ocfs2_calc_value_tree_metas()
6723 bucket); in ocfs2_calc_value_tree_metas()
6860 * bucket. in ocfs2_reflink_xattr_bucket()
6885 * Re-access and dirty the bucket to calculate metaecc. in ocfs2_reflink_xattr_bucket()
7034 * We will add bucket one by one, and refcount all the xattrs in the bucket