diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-10-18 22:11:42 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:34:16 -0500 |
commit | 4ac6032d6c92f0ac65cf5bc56b68557b3f099b66 (patch) | |
tree | 6625e9d2fe6cd777507023d1dbfac4311aa32192 | |
parent | fe0bdec68b77020281dc814805edfe594ae89e0f (diff) |
ocfs2: Field prefixes for the xattr_bucket structure
The ocfs2_xattr_bucket structure keeps track of the buffers for one
xattr bucket. Let's prefix the fields for easier code navigation.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
-rw-r--r-- | fs/ocfs2/xattr.c | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 74d7367ade13..9c0ee42eb931 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -61,8 +61,8 @@ struct ocfs2_xattr_def_value_root { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | struct ocfs2_xattr_bucket { | 63 | struct ocfs2_xattr_bucket { |
64 | struct buffer_head *bhs[OCFS2_XATTR_MAX_BLOCKS_PER_BUCKET]; | 64 | struct buffer_head *bu_bhs[OCFS2_XATTR_MAX_BLOCKS_PER_BUCKET]; |
65 | struct ocfs2_xattr_header *xh; | 65 | struct ocfs2_xattr_header *bu_xh; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | #define OCFS2_XATTR_ROOT_SIZE (sizeof(struct ocfs2_xattr_def_value_root)) | 68 | #define OCFS2_XATTR_ROOT_SIZE (sizeof(struct ocfs2_xattr_def_value_root)) |
@@ -795,11 +795,11 @@ static int ocfs2_xattr_block_get(struct inode *inode, | |||
795 | 795 | ||
796 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { | 796 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { |
797 | ret = ocfs2_xattr_bucket_get_name_value(inode, | 797 | ret = ocfs2_xattr_bucket_get_name_value(inode, |
798 | xs->bucket.xh, | 798 | xs->bucket.bu_xh, |
799 | i, | 799 | i, |
800 | &block_off, | 800 | &block_off, |
801 | &name_offset); | 801 | &name_offset); |
802 | xs->base = xs->bucket.bhs[block_off]->b_data; | 802 | xs->base = xs->bucket.bu_bhs[block_off]->b_data; |
803 | } | 803 | } |
804 | if (ocfs2_xattr_is_local(xs->here)) { | 804 | if (ocfs2_xattr_is_local(xs->here)) { |
805 | memcpy(buffer, (void *)xs->base + | 805 | memcpy(buffer, (void *)xs->base + |
@@ -818,7 +818,7 @@ static int ocfs2_xattr_block_get(struct inode *inode, | |||
818 | ret = size; | 818 | ret = size; |
819 | cleanup: | 819 | cleanup: |
820 | for (i = 0; i < OCFS2_XATTR_MAX_BLOCKS_PER_BUCKET; i++) | 820 | for (i = 0; i < OCFS2_XATTR_MAX_BLOCKS_PER_BUCKET; i++) |
821 | brelse(xs->bucket.bhs[i]); | 821 | brelse(xs->bucket.bu_bhs[i]); |
822 | memset(&xs->bucket, 0, sizeof(xs->bucket)); | 822 | memset(&xs->bucket, 0, sizeof(xs->bucket)); |
823 | 823 | ||
824 | brelse(xs->xattr_bh); | 824 | brelse(xs->xattr_bh); |
@@ -2032,7 +2032,7 @@ cleanup: | |||
2032 | brelse(di_bh); | 2032 | brelse(di_bh); |
2033 | brelse(xbs.xattr_bh); | 2033 | brelse(xbs.xattr_bh); |
2034 | for (i = 0; i < blk_per_bucket; i++) | 2034 | for (i = 0; i < blk_per_bucket; i++) |
2035 | brelse(xbs.bucket.bhs[i]); | 2035 | brelse(xbs.bucket.bu_bhs[i]); |
2036 | 2036 | ||
2037 | return ret; | 2037 | return ret; |
2038 | } | 2038 | } |
@@ -2276,13 +2276,13 @@ static int ocfs2_xattr_bucket_find(struct inode *inode, | |||
2276 | lower_bh = bh; | 2276 | lower_bh = bh; |
2277 | bh = NULL; | 2277 | bh = NULL; |
2278 | } | 2278 | } |
2279 | xs->bucket.bhs[0] = lower_bh; | 2279 | xs->bucket.bu_bhs[0] = lower_bh; |
2280 | xs->bucket.xh = (struct ocfs2_xattr_header *) | 2280 | xs->bucket.bu_xh = (struct ocfs2_xattr_header *) |
2281 | xs->bucket.bhs[0]->b_data; | 2281 | xs->bucket.bu_bhs[0]->b_data; |
2282 | lower_bh = NULL; | 2282 | lower_bh = NULL; |
2283 | 2283 | ||
2284 | xs->header = xs->bucket.xh; | 2284 | xs->header = xs->bucket.bu_xh; |
2285 | xs->base = xs->bucket.bhs[0]->b_data; | 2285 | xs->base = xs->bucket.bu_bhs[0]->b_data; |
2286 | xs->end = xs->base + inode->i_sb->s_blocksize; | 2286 | xs->end = xs->base + inode->i_sb->s_blocksize; |
2287 | 2287 | ||
2288 | if (found) { | 2288 | if (found) { |
@@ -2290,8 +2290,8 @@ static int ocfs2_xattr_bucket_find(struct inode *inode, | |||
2290 | * If we have found the xattr enty, read all the blocks in | 2290 | * If we have found the xattr enty, read all the blocks in |
2291 | * this bucket. | 2291 | * this bucket. |
2292 | */ | 2292 | */ |
2293 | ret = ocfs2_read_blocks(inode, xs->bucket.bhs[0]->b_blocknr + 1, | 2293 | ret = ocfs2_read_blocks(inode, xs->bucket.bu_bhs[0]->b_blocknr + 1, |
2294 | blk_per_bucket - 1, &xs->bucket.bhs[1], | 2294 | blk_per_bucket - 1, &xs->bucket.bu_bhs[1], |
2295 | 0); | 2295 | 0); |
2296 | if (ret) { | 2296 | if (ret) { |
2297 | mlog_errno(ret); | 2297 | mlog_errno(ret); |
@@ -2300,7 +2300,7 @@ static int ocfs2_xattr_bucket_find(struct inode *inode, | |||
2300 | 2300 | ||
2301 | xs->here = &xs->header->xh_entries[index]; | 2301 | xs->here = &xs->header->xh_entries[index]; |
2302 | mlog(0, "find xattr %s in bucket %llu, entry = %u\n", name, | 2302 | mlog(0, "find xattr %s in bucket %llu, entry = %u\n", name, |
2303 | (unsigned long long)xs->bucket.bhs[0]->b_blocknr, index); | 2303 | (unsigned long long)xs->bucket.bu_bhs[0]->b_blocknr, index); |
2304 | } else | 2304 | } else |
2305 | ret = -ENODATA; | 2305 | ret = -ENODATA; |
2306 | 2306 | ||
@@ -2370,23 +2370,23 @@ static int ocfs2_iterate_xattr_buckets(struct inode *inode, | |||
2370 | 2370 | ||
2371 | for (i = 0; i < num_buckets; i++, blkno += blk_per_bucket) { | 2371 | for (i = 0; i < num_buckets; i++, blkno += blk_per_bucket) { |
2372 | ret = ocfs2_read_blocks(inode, blkno, blk_per_bucket, | 2372 | ret = ocfs2_read_blocks(inode, blkno, blk_per_bucket, |
2373 | bucket.bhs, 0); | 2373 | bucket.bu_bhs, 0); |
2374 | if (ret) { | 2374 | if (ret) { |
2375 | mlog_errno(ret); | 2375 | mlog_errno(ret); |
2376 | goto out; | 2376 | goto out; |
2377 | } | 2377 | } |
2378 | 2378 | ||
2379 | bucket.xh = (struct ocfs2_xattr_header *)bucket.bhs[0]->b_data; | 2379 | bucket.bu_xh = (struct ocfs2_xattr_header *)bucket.bu_bhs[0]->b_data; |
2380 | /* | 2380 | /* |
2381 | * The real bucket num in this series of blocks is stored | 2381 | * The real bucket num in this series of blocks is stored |
2382 | * in the 1st bucket. | 2382 | * in the 1st bucket. |
2383 | */ | 2383 | */ |
2384 | if (i == 0) | 2384 | if (i == 0) |
2385 | num_buckets = le16_to_cpu(bucket.xh->xh_num_buckets); | 2385 | num_buckets = le16_to_cpu(bucket.bu_xh->xh_num_buckets); |
2386 | 2386 | ||
2387 | mlog(0, "iterating xattr bucket %llu, first hash %u\n", | 2387 | mlog(0, "iterating xattr bucket %llu, first hash %u\n", |
2388 | (unsigned long long)blkno, | 2388 | (unsigned long long)blkno, |
2389 | le32_to_cpu(bucket.xh->xh_entries[0].xe_name_hash)); | 2389 | le32_to_cpu(bucket.bu_xh->xh_entries[0].xe_name_hash)); |
2390 | if (func) { | 2390 | if (func) { |
2391 | ret = func(inode, &bucket, para); | 2391 | ret = func(inode, &bucket, para); |
2392 | if (ret) { | 2392 | if (ret) { |
@@ -2396,13 +2396,13 @@ static int ocfs2_iterate_xattr_buckets(struct inode *inode, | |||
2396 | } | 2396 | } |
2397 | 2397 | ||
2398 | for (j = 0; j < blk_per_bucket; j++) | 2398 | for (j = 0; j < blk_per_bucket; j++) |
2399 | brelse(bucket.bhs[j]); | 2399 | brelse(bucket.bu_bhs[j]); |
2400 | memset(&bucket, 0, sizeof(bucket)); | 2400 | memset(&bucket, 0, sizeof(bucket)); |
2401 | } | 2401 | } |
2402 | 2402 | ||
2403 | out: | 2403 | out: |
2404 | for (j = 0; j < blk_per_bucket; j++) | 2404 | for (j = 0; j < blk_per_bucket; j++) |
2405 | brelse(bucket.bhs[j]); | 2405 | brelse(bucket.bu_bhs[j]); |
2406 | 2406 | ||
2407 | return ret; | 2407 | return ret; |
2408 | } | 2408 | } |
@@ -2441,21 +2441,21 @@ static int ocfs2_list_xattr_bucket(struct inode *inode, | |||
2441 | int i, block_off, new_offset; | 2441 | int i, block_off, new_offset; |
2442 | const char *prefix, *name; | 2442 | const char *prefix, *name; |
2443 | 2443 | ||
2444 | for (i = 0 ; i < le16_to_cpu(bucket->xh->xh_count); i++) { | 2444 | for (i = 0 ; i < le16_to_cpu(bucket->bu_xh->xh_count); i++) { |
2445 | struct ocfs2_xattr_entry *entry = &bucket->xh->xh_entries[i]; | 2445 | struct ocfs2_xattr_entry *entry = &bucket->bu_xh->xh_entries[i]; |
2446 | type = ocfs2_xattr_get_type(entry); | 2446 | type = ocfs2_xattr_get_type(entry); |
2447 | prefix = ocfs2_xattr_prefix(type); | 2447 | prefix = ocfs2_xattr_prefix(type); |
2448 | 2448 | ||
2449 | if (prefix) { | 2449 | if (prefix) { |
2450 | ret = ocfs2_xattr_bucket_get_name_value(inode, | 2450 | ret = ocfs2_xattr_bucket_get_name_value(inode, |
2451 | bucket->xh, | 2451 | bucket->bu_xh, |
2452 | i, | 2452 | i, |
2453 | &block_off, | 2453 | &block_off, |
2454 | &new_offset); | 2454 | &new_offset); |
2455 | if (ret) | 2455 | if (ret) |
2456 | break; | 2456 | break; |
2457 | 2457 | ||
2458 | name = (const char *)bucket->bhs[block_off]->b_data + | 2458 | name = (const char *)bucket->bu_bhs[block_off]->b_data + |
2459 | new_offset; | 2459 | new_offset; |
2460 | ret = ocfs2_xattr_list_entry(xl->buffer, | 2460 | ret = ocfs2_xattr_list_entry(xl->buffer, |
2461 | xl->buffer_size, | 2461 | xl->buffer_size, |
@@ -2626,10 +2626,10 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode, | |||
2626 | int i, blocksize = inode->i_sb->s_blocksize; | 2626 | int i, blocksize = inode->i_sb->s_blocksize; |
2627 | u16 blk_per_bucket = ocfs2_blocks_per_xattr_bucket(inode->i_sb); | 2627 | u16 blk_per_bucket = ocfs2_blocks_per_xattr_bucket(inode->i_sb); |
2628 | 2628 | ||
2629 | xs->bucket.bhs[0] = new_bh; | 2629 | xs->bucket.bu_bhs[0] = new_bh; |
2630 | get_bh(new_bh); | 2630 | get_bh(new_bh); |
2631 | xs->bucket.xh = (struct ocfs2_xattr_header *)xs->bucket.bhs[0]->b_data; | 2631 | xs->bucket.bu_xh = (struct ocfs2_xattr_header *)xs->bucket.bu_bhs[0]->b_data; |
2632 | xs->header = xs->bucket.xh; | 2632 | xs->header = xs->bucket.bu_xh; |
2633 | 2633 | ||
2634 | xs->base = new_bh->b_data; | 2634 | xs->base = new_bh->b_data; |
2635 | xs->end = xs->base + inode->i_sb->s_blocksize; | 2635 | xs->end = xs->base + inode->i_sb->s_blocksize; |
@@ -2637,8 +2637,8 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode, | |||
2637 | if (!xs->not_found) { | 2637 | if (!xs->not_found) { |
2638 | if (OCFS2_XATTR_BUCKET_SIZE != blocksize) { | 2638 | if (OCFS2_XATTR_BUCKET_SIZE != blocksize) { |
2639 | ret = ocfs2_read_blocks(inode, | 2639 | ret = ocfs2_read_blocks(inode, |
2640 | xs->bucket.bhs[0]->b_blocknr + 1, | 2640 | xs->bucket.bu_bhs[0]->b_blocknr + 1, |
2641 | blk_per_bucket - 1, &xs->bucket.bhs[1], | 2641 | blk_per_bucket - 1, &xs->bucket.bu_bhs[1], |
2642 | 0); | 2642 | 0); |
2643 | if (ret) { | 2643 | if (ret) { |
2644 | mlog_errno(ret); | 2644 | mlog_errno(ret); |
@@ -2835,7 +2835,7 @@ static int ocfs2_defrag_xattr_bucket(struct inode *inode, | |||
2835 | size_t end, offset, len, value_len; | 2835 | size_t end, offset, len, value_len; |
2836 | struct ocfs2_xattr_header *xh; | 2836 | struct ocfs2_xattr_header *xh; |
2837 | char *entries, *buf, *bucket_buf = NULL; | 2837 | char *entries, *buf, *bucket_buf = NULL; |
2838 | u64 blkno = bucket->bhs[0]->b_blocknr; | 2838 | u64 blkno = bucket->bu_bhs[0]->b_blocknr; |
2839 | u16 blk_per_bucket = ocfs2_blocks_per_xattr_bucket(inode->i_sb); | 2839 | u16 blk_per_bucket = ocfs2_blocks_per_xattr_bucket(inode->i_sb); |
2840 | u16 xh_free_start; | 2840 | u16 xh_free_start; |
2841 | size_t blocksize = inode->i_sb->s_blocksize; | 2841 | size_t blocksize = inode->i_sb->s_blocksize; |
@@ -3929,7 +3929,7 @@ static inline char *ocfs2_xattr_bucket_get_val(struct inode *inode, | |||
3929 | int block_off = offs >> inode->i_sb->s_blocksize_bits; | 3929 | int block_off = offs >> inode->i_sb->s_blocksize_bits; |
3930 | 3930 | ||
3931 | offs = offs % inode->i_sb->s_blocksize; | 3931 | offs = offs % inode->i_sb->s_blocksize; |
3932 | return bucket->bhs[block_off]->b_data + offs; | 3932 | return bucket->bu_bhs[block_off]->b_data + offs; |
3933 | } | 3933 | } |
3934 | 3934 | ||
3935 | /* | 3935 | /* |
@@ -4124,12 +4124,12 @@ static int ocfs2_xattr_set_entry_in_bucket(struct inode *inode, | |||
4124 | 4124 | ||
4125 | mlog(0, "Set xattr entry len = %lu index = %d in bucket %llu\n", | 4125 | mlog(0, "Set xattr entry len = %lu index = %d in bucket %llu\n", |
4126 | (unsigned long)xi->value_len, xi->name_index, | 4126 | (unsigned long)xi->value_len, xi->name_index, |
4127 | (unsigned long long)xs->bucket.bhs[0]->b_blocknr); | 4127 | (unsigned long long)xs->bucket.bu_bhs[0]->b_blocknr); |
4128 | 4128 | ||
4129 | if (!xs->bucket.bhs[1]) { | 4129 | if (!xs->bucket.bu_bhs[1]) { |
4130 | ret = ocfs2_read_blocks(inode, | 4130 | ret = ocfs2_read_blocks(inode, |
4131 | xs->bucket.bhs[0]->b_blocknr + 1, | 4131 | xs->bucket.bu_bhs[0]->b_blocknr + 1, |
4132 | blk_per_bucket - 1, &xs->bucket.bhs[1], | 4132 | blk_per_bucket - 1, &xs->bucket.bu_bhs[1], |
4133 | 0); | 4133 | 0); |
4134 | if (ret) { | 4134 | if (ret) { |
4135 | mlog_errno(ret); | 4135 | mlog_errno(ret); |
@@ -4146,7 +4146,7 @@ static int ocfs2_xattr_set_entry_in_bucket(struct inode *inode, | |||
4146 | } | 4146 | } |
4147 | 4147 | ||
4148 | for (i = 0; i < blk_per_bucket; i++) { | 4148 | for (i = 0; i < blk_per_bucket; i++) { |
4149 | ret = ocfs2_journal_access(handle, inode, xs->bucket.bhs[i], | 4149 | ret = ocfs2_journal_access(handle, inode, xs->bucket.bu_bhs[i], |
4150 | OCFS2_JOURNAL_ACCESS_WRITE); | 4150 | OCFS2_JOURNAL_ACCESS_WRITE); |
4151 | if (ret < 0) { | 4151 | if (ret < 0) { |
4152 | mlog_errno(ret); | 4152 | mlog_errno(ret); |
@@ -4158,7 +4158,7 @@ static int ocfs2_xattr_set_entry_in_bucket(struct inode *inode, | |||
4158 | 4158 | ||
4159 | /*Only dirty the blocks we have touched in set xattr. */ | 4159 | /*Only dirty the blocks we have touched in set xattr. */ |
4160 | ret = ocfs2_xattr_bucket_handle_journal(inode, handle, xs, | 4160 | ret = ocfs2_xattr_bucket_handle_journal(inode, handle, xs, |
4161 | xs->bucket.bhs, blk_per_bucket); | 4161 | xs->bucket.bu_bhs, blk_per_bucket); |
4162 | if (ret) | 4162 | if (ret) |
4163 | mlog_errno(ret); | 4163 | mlog_errno(ret); |
4164 | out: | 4164 | out: |
@@ -4272,10 +4272,10 @@ static int ocfs2_xattr_bucket_value_truncate_xs(struct inode *inode, | |||
4272 | struct ocfs2_xattr_entry *xe = xs->here; | 4272 | struct ocfs2_xattr_entry *xe = xs->here; |
4273 | struct ocfs2_xattr_header *xh = (struct ocfs2_xattr_header *)xs->base; | 4273 | struct ocfs2_xattr_header *xh = (struct ocfs2_xattr_header *)xs->base; |
4274 | 4274 | ||
4275 | BUG_ON(!xs->bucket.bhs[0] || !xe || ocfs2_xattr_is_local(xe)); | 4275 | BUG_ON(!xs->bucket.bu_bhs[0] || !xe || ocfs2_xattr_is_local(xe)); |
4276 | 4276 | ||
4277 | offset = xe - xh->xh_entries; | 4277 | offset = xe - xh->xh_entries; |
4278 | ret = ocfs2_xattr_bucket_value_truncate(inode, xs->bucket.bhs[0], | 4278 | ret = ocfs2_xattr_bucket_value_truncate(inode, xs->bucket.bu_bhs[0], |
4279 | offset, len); | 4279 | offset, len); |
4280 | if (ret) | 4280 | if (ret) |
4281 | mlog_errno(ret); | 4281 | mlog_errno(ret); |
@@ -4395,7 +4395,7 @@ static void ocfs2_xattr_bucket_remove_xs(struct inode *inode, | |||
4395 | struct ocfs2_xattr_search *xs) | 4395 | struct ocfs2_xattr_search *xs) |
4396 | { | 4396 | { |
4397 | handle_t *handle = NULL; | 4397 | handle_t *handle = NULL; |
4398 | struct ocfs2_xattr_header *xh = xs->bucket.xh; | 4398 | struct ocfs2_xattr_header *xh = xs->bucket.bu_xh; |
4399 | struct ocfs2_xattr_entry *last = &xh->xh_entries[ | 4399 | struct ocfs2_xattr_entry *last = &xh->xh_entries[ |
4400 | le16_to_cpu(xh->xh_count) - 1]; | 4400 | le16_to_cpu(xh->xh_count) - 1]; |
4401 | int ret = 0; | 4401 | int ret = 0; |
@@ -4407,7 +4407,7 @@ static void ocfs2_xattr_bucket_remove_xs(struct inode *inode, | |||
4407 | return; | 4407 | return; |
4408 | } | 4408 | } |
4409 | 4409 | ||
4410 | ret = ocfs2_journal_access(handle, inode, xs->bucket.bhs[0], | 4410 | ret = ocfs2_journal_access(handle, inode, xs->bucket.bu_bhs[0], |
4411 | OCFS2_JOURNAL_ACCESS_WRITE); | 4411 | OCFS2_JOURNAL_ACCESS_WRITE); |
4412 | if (ret) { | 4412 | if (ret) { |
4413 | mlog_errno(ret); | 4413 | mlog_errno(ret); |
@@ -4420,7 +4420,7 @@ static void ocfs2_xattr_bucket_remove_xs(struct inode *inode, | |||
4420 | memset(last, 0, sizeof(struct ocfs2_xattr_entry)); | 4420 | memset(last, 0, sizeof(struct ocfs2_xattr_entry)); |
4421 | le16_add_cpu(&xh->xh_count, -1); | 4421 | le16_add_cpu(&xh->xh_count, -1); |
4422 | 4422 | ||
4423 | ret = ocfs2_journal_dirty(handle, xs->bucket.bhs[0]); | 4423 | ret = ocfs2_journal_dirty(handle, xs->bucket.bu_bhs[0]); |
4424 | if (ret < 0) | 4424 | if (ret < 0) |
4425 | mlog_errno(ret); | 4425 | mlog_errno(ret); |
4426 | out_commit: | 4426 | out_commit: |
@@ -4530,7 +4530,7 @@ static int ocfs2_check_xattr_bucket_collision(struct inode *inode, | |||
4530 | struct ocfs2_xattr_bucket *bucket, | 4530 | struct ocfs2_xattr_bucket *bucket, |
4531 | const char *name) | 4531 | const char *name) |
4532 | { | 4532 | { |
4533 | struct ocfs2_xattr_header *xh = bucket->xh; | 4533 | struct ocfs2_xattr_header *xh = bucket->bu_xh; |
4534 | u32 name_hash = ocfs2_xattr_name_hash(inode, name, strlen(name)); | 4534 | u32 name_hash = ocfs2_xattr_name_hash(inode, name, strlen(name)); |
4535 | 4535 | ||
4536 | if (name_hash != le32_to_cpu(xh->xh_entries[0].xe_name_hash)) | 4536 | if (name_hash != le32_to_cpu(xh->xh_entries[0].xe_name_hash)) |
@@ -4540,7 +4540,7 @@ static int ocfs2_check_xattr_bucket_collision(struct inode *inode, | |||
4540 | xh->xh_entries[0].xe_name_hash) { | 4540 | xh->xh_entries[0].xe_name_hash) { |
4541 | mlog(ML_ERROR, "Too much hash collision in xattr bucket %llu, " | 4541 | mlog(ML_ERROR, "Too much hash collision in xattr bucket %llu, " |
4542 | "hash = %u\n", | 4542 | "hash = %u\n", |
4543 | (unsigned long long)bucket->bhs[0]->b_blocknr, | 4543 | (unsigned long long)bucket->bu_bhs[0]->b_blocknr, |
4544 | le32_to_cpu(xh->xh_entries[0].xe_name_hash)); | 4544 | le32_to_cpu(xh->xh_entries[0].xe_name_hash)); |
4545 | return -ENOSPC; | 4545 | return -ENOSPC; |
4546 | } | 4546 | } |
@@ -4574,7 +4574,7 @@ try_again: | |||
4574 | 4574 | ||
4575 | mlog_bug_on_msg(header_size > blocksize, "bucket %llu has header size " | 4575 | mlog_bug_on_msg(header_size > blocksize, "bucket %llu has header size " |
4576 | "of %u which exceed block size\n", | 4576 | "of %u which exceed block size\n", |
4577 | (unsigned long long)xs->bucket.bhs[0]->b_blocknr, | 4577 | (unsigned long long)xs->bucket.bu_bhs[0]->b_blocknr, |
4578 | header_size); | 4578 | header_size); |
4579 | 4579 | ||
4580 | if (xi->value && xi->value_len > OCFS2_XATTR_INLINE_SIZE) | 4580 | if (xi->value && xi->value_len > OCFS2_XATTR_INLINE_SIZE) |
@@ -4614,7 +4614,7 @@ try_again: | |||
4614 | mlog(0, "xs->not_found = %d, in xattr bucket %llu: free = %d, " | 4614 | mlog(0, "xs->not_found = %d, in xattr bucket %llu: free = %d, " |
4615 | "need = %d, max_free = %d, xh_free_start = %u, xh_name_value_len =" | 4615 | "need = %d, max_free = %d, xh_free_start = %u, xh_name_value_len =" |
4616 | " %u\n", xs->not_found, | 4616 | " %u\n", xs->not_found, |
4617 | (unsigned long long)xs->bucket.bhs[0]->b_blocknr, | 4617 | (unsigned long long)xs->bucket.bu_bhs[0]->b_blocknr, |
4618 | free, need, max_free, le16_to_cpu(xh->xh_free_start), | 4618 | free, need, max_free, le16_to_cpu(xh->xh_free_start), |
4619 | le16_to_cpu(xh->xh_name_value_len)); | 4619 | le16_to_cpu(xh->xh_name_value_len)); |
4620 | 4620 | ||
@@ -4667,14 +4667,14 @@ try_again: | |||
4667 | 4667 | ||
4668 | ret = ocfs2_add_new_xattr_bucket(inode, | 4668 | ret = ocfs2_add_new_xattr_bucket(inode, |
4669 | xs->xattr_bh, | 4669 | xs->xattr_bh, |
4670 | xs->bucket.bhs[0]); | 4670 | xs->bucket.bu_bhs[0]); |
4671 | if (ret) { | 4671 | if (ret) { |
4672 | mlog_errno(ret); | 4672 | mlog_errno(ret); |
4673 | goto out; | 4673 | goto out; |
4674 | } | 4674 | } |
4675 | 4675 | ||
4676 | for (i = 0; i < blk_per_bucket; i++) | 4676 | for (i = 0; i < blk_per_bucket; i++) |
4677 | brelse(xs->bucket.bhs[i]); | 4677 | brelse(xs->bucket.bu_bhs[i]); |
4678 | 4678 | ||
4679 | memset(&xs->bucket, 0, sizeof(xs->bucket)); | 4679 | memset(&xs->bucket, 0, sizeof(xs->bucket)); |
4680 | 4680 | ||
@@ -4700,7 +4700,7 @@ static int ocfs2_delete_xattr_in_bucket(struct inode *inode, | |||
4700 | void *para) | 4700 | void *para) |
4701 | { | 4701 | { |
4702 | int ret = 0; | 4702 | int ret = 0; |
4703 | struct ocfs2_xattr_header *xh = bucket->xh; | 4703 | struct ocfs2_xattr_header *xh = bucket->bu_xh; |
4704 | u16 i; | 4704 | u16 i; |
4705 | struct ocfs2_xattr_entry *xe; | 4705 | struct ocfs2_xattr_entry *xe; |
4706 | 4706 | ||
@@ -4710,7 +4710,7 @@ static int ocfs2_delete_xattr_in_bucket(struct inode *inode, | |||
4710 | continue; | 4710 | continue; |
4711 | 4711 | ||
4712 | ret = ocfs2_xattr_bucket_value_truncate(inode, | 4712 | ret = ocfs2_xattr_bucket_value_truncate(inode, |
4713 | bucket->bhs[0], | 4713 | bucket->bu_bhs[0], |
4714 | i, 0); | 4714 | i, 0); |
4715 | if (ret) { | 4715 | if (ret) { |
4716 | mlog_errno(ret); | 4716 | mlog_errno(ret); |