diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2013-07-15 23:19:18 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 07:57:37 -0400 |
commit | 3cae210fa529d69cb25c2a3c491f29dab687b245 (patch) | |
tree | 998853ce555cbabda25eafbc4e8fc9aaa378b693 /fs/btrfs/disk-io.c | |
parent | 1e7bac1ef754b3112eb78c64a7382d286e454424 (diff) |
btrfs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert
Some codes still use the cpu_to_lexx instead of the
BTRFS_SETGET_STACK_FUNCS declared in ctree.h.
Also added some BTRFS_SETGET_STACK_FUNCS for btrfs_header btrfs_timespec
and other structures.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaoxie@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 6b092a1c4e37..56fcf8439f42 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1413,11 +1413,11 @@ int btrfs_add_log_tree(struct btrfs_trans_handle *trans, | |||
1413 | log_root->root_key.offset = root->root_key.objectid; | 1413 | log_root->root_key.offset = root->root_key.objectid; |
1414 | 1414 | ||
1415 | inode_item = &log_root->root_item.inode; | 1415 | inode_item = &log_root->root_item.inode; |
1416 | inode_item->generation = cpu_to_le64(1); | 1416 | btrfs_set_stack_inode_generation(inode_item, 1); |
1417 | inode_item->size = cpu_to_le64(3); | 1417 | btrfs_set_stack_inode_size(inode_item, 3); |
1418 | inode_item->nlink = cpu_to_le32(1); | 1418 | btrfs_set_stack_inode_nlink(inode_item, 1); |
1419 | inode_item->nbytes = cpu_to_le64(root->leafsize); | 1419 | btrfs_set_stack_inode_nbytes(inode_item, root->leafsize); |
1420 | inode_item->mode = cpu_to_le32(S_IFDIR | 0755); | 1420 | btrfs_set_stack_inode_mode(inode_item, S_IFDIR | 0755); |
1421 | 1421 | ||
1422 | btrfs_set_root_node(&log_root->root_item, log_root->node); | 1422 | btrfs_set_root_node(&log_root->root_item, log_root->node); |
1423 | 1423 | ||
@@ -2575,7 +2575,7 @@ int open_ctree(struct super_block *sb, | |||
2575 | sb->s_blocksize = sectorsize; | 2575 | sb->s_blocksize = sectorsize; |
2576 | sb->s_blocksize_bits = blksize_bits(sectorsize); | 2576 | sb->s_blocksize_bits = blksize_bits(sectorsize); |
2577 | 2577 | ||
2578 | if (disk_super->magic != cpu_to_le64(BTRFS_MAGIC)) { | 2578 | if (btrfs_super_magic(disk_super) != BTRFS_MAGIC) { |
2579 | printk(KERN_INFO "btrfs: valid FS not found on %s\n", sb->s_id); | 2579 | printk(KERN_INFO "btrfs: valid FS not found on %s\n", sb->s_id); |
2580 | goto fail_sb_buffer; | 2580 | goto fail_sb_buffer; |
2581 | } | 2581 | } |
@@ -2991,7 +2991,7 @@ struct buffer_head *btrfs_read_dev_super(struct block_device *bdev) | |||
2991 | 2991 | ||
2992 | super = (struct btrfs_super_block *)bh->b_data; | 2992 | super = (struct btrfs_super_block *)bh->b_data; |
2993 | if (btrfs_super_bytenr(super) != bytenr || | 2993 | if (btrfs_super_bytenr(super) != bytenr || |
2994 | super->magic != cpu_to_le64(BTRFS_MAGIC)) { | 2994 | btrfs_super_magic(super) != BTRFS_MAGIC) { |
2995 | brelse(bh); | 2995 | brelse(bh); |
2996 | continue; | 2996 | continue; |
2997 | } | 2997 | } |