diff options
author | Jeff Mahoney <jeffm@suse.com> | 2014-04-23 10:00:35 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-05-06 16:51:44 -0400 |
commit | 4cf5f7addf18ecae2ea49b11944976cbd26d5281 (patch) | |
tree | 52aa9ebf68e7951bacbdc708f1d19467736187bc /fs/reiserfs/prints.c | |
parent | 797d9016ceca69879bb273218810fa0beef46aac (diff) |
reiserfs: cleanup, rename key and item accessors to more friendly names
This patch does a quick search and replace:
B_N_PITEM_HEAD() -> item_head()
B_N_PDELIM_KEY() -> internal_key()
B_N_PKEY() -> leaf_key()
B_N_PITEM() -> item_body()
And the item_head version:
B_I_PITEM() -> ih_item_body()
I_ENTRY_COUNT() -> ih_entry_count()
And the treepath variants:
get_ih() -> tp_item_head()
PATH_PITEM_HEAD() -> tp_item_head()
get_item() -> tp_item_body()
... which makes the code much easier on the eyes.
I've also removed a few unused macros.
Checkpatch will complain about the 80 character limit for do_balan.c.
I've addressed that in a later patchset to split up balance_leaf().
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/reiserfs/prints.c')
-rw-r--r-- | fs/reiserfs/prints.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c index 54944d5a4a6e..41f788148d44 100644 --- a/fs/reiserfs/prints.c +++ b/fs/reiserfs/prints.c | |||
@@ -439,7 +439,7 @@ static int print_internal(struct buffer_head *bh, int first, int last) | |||
439 | dc = B_N_CHILD(bh, from); | 439 | dc = B_N_CHILD(bh, from); |
440 | reiserfs_printk("PTR %d: %y ", from, dc); | 440 | reiserfs_printk("PTR %d: %y ", from, dc); |
441 | 441 | ||
442 | for (i = from, key = B_N_PDELIM_KEY(bh, from), dc++; i < to; | 442 | for (i = from, key = internal_key(bh, from), dc++; i < to; |
443 | i++, key++, dc++) { | 443 | i++, key++, dc++) { |
444 | reiserfs_printk("KEY %d: %k PTR %d: %y ", i, key, i + 1, dc); | 444 | reiserfs_printk("KEY %d: %k PTR %d: %y ", i, key, i + 1, dc); |
445 | if (i && i % 4 == 0) | 445 | if (i && i % 4 == 0) |
@@ -463,7 +463,7 @@ static int print_leaf(struct buffer_head *bh, int print_mode, int first, | |||
463 | check_leaf(bh); | 463 | check_leaf(bh); |
464 | 464 | ||
465 | blkh = B_BLK_HEAD(bh); | 465 | blkh = B_BLK_HEAD(bh); |
466 | ih = B_N_PITEM_HEAD(bh, 0); | 466 | ih = item_head(bh, 0); |
467 | nr = blkh_nr_item(blkh); | 467 | nr = blkh_nr_item(blkh); |
468 | 468 | ||
469 | printk | 469 | printk |
@@ -496,7 +496,7 @@ static int print_leaf(struct buffer_head *bh, int print_mode, int first, | |||
496 | ("-------------------------------------------------------------------------------\n"); | 496 | ("-------------------------------------------------------------------------------\n"); |
497 | reiserfs_printk("|%2d| %h |\n", i, ih); | 497 | reiserfs_printk("|%2d| %h |\n", i, ih); |
498 | if (print_mode & PRINT_LEAF_ITEMS) | 498 | if (print_mode & PRINT_LEAF_ITEMS) |
499 | op_print_item(ih, B_I_PITEM(bh, ih)); | 499 | op_print_item(ih, ih_item_body(bh, ih)); |
500 | } | 500 | } |
501 | 501 | ||
502 | printk | 502 | printk |
@@ -744,8 +744,8 @@ void check_leaf(struct buffer_head *bh) | |||
744 | if (!bh) | 744 | if (!bh) |
745 | return; | 745 | return; |
746 | check_leaf_block_head(bh); | 746 | check_leaf_block_head(bh); |
747 | for (i = 0, ih = B_N_PITEM_HEAD(bh, 0); i < B_NR_ITEMS(bh); i++, ih++) | 747 | for (i = 0, ih = item_head(bh, 0); i < B_NR_ITEMS(bh); i++, ih++) |
748 | op_check_item(ih, B_I_PITEM(bh, ih)); | 748 | op_check_item(ih, ih_item_body(bh, ih)); |
749 | } | 749 | } |
750 | 750 | ||
751 | void check_internal(struct buffer_head *bh) | 751 | void check_internal(struct buffer_head *bh) |