btrfs: remove unused parameter from btrfs_header_fsid
PATCH 1/1 btrfs: remove unused parameter from btrfs_header_fsid
Remove unused parameter, 'eb'. Unused since introduction in 5f39d397dfbe140a14edecd4e73c34ce23c4f9ee
--- fs/btrfs/ctree.c | 10 +++++----- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/ioctl.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
fs/btrfs/ctree.c +5 -5
@@ -275,7 +275,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,btrfs_set_header_owner (cow, new_root_objectid);write_extent_buffer (cow, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (cow), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE );WARN_ON (btrfs_header_generation (buf) > trans->transid);
@@ -1047,7 +1047,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,btrfs_set_header_owner (cow, root->root_key.objectid);write_extent_buffer (cow, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (cow), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); ret =update_ref_for_cow (trans, root, buf, cow, &last_ref);
@@ -3145,7 +3145,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,btrfs_set_header_owner (c, root->root_key.objectid);write_extent_buffer (c, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (c), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(c, root->fs_info->chunk_tree_uuid,
@@ -3285,7 +3285,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (split,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (split, root->root_key.objectid);write_extent_buffer (split, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (split), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(split, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(split),
@@ -4041,7 +4041,7 @@ again:btrfs_set_header_owner (right, root->root_key.objectid);btrfs_set_header_level (right,0 );write_extent_buffer (right, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (right), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(right, root->fs_info->chunk_tree_uuid,
fs/btrfs/ctree.h +1 -1
@@ -2602,7 +2602,7 @@ static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb,btrfs_set_header_flags (eb, flags); } -static inline u8 *btrfs_header_fsid (struct extent_buffer *eb) +static inline u8 *btrfs_header_fsid (void ) {unsigned long ptr = offsetof(struct btrfs_header , fsid);return (u8 *)ptr;
fs/btrfs/disk-io.c +3 -3
@@ -497,7 +497,7 @@ static int check_tree_block_fsid(struct btrfs_root *root,u8 fsid[BTRFS_UUID_SIZE ];int ret =1 ; -read_extent_buffer (eb, fsid, (unsigned long )btrfs_header_fsid (eb), +read_extent_buffer (eb, fsid, (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE );while (fs_devices) {if (!memcmp (fsid, fs_devices->fsid,BTRFS_FSID_SIZE )) {
@@ -1291,7 +1291,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (leaf, fs_info->fsid, - (unsigned long )btrfs_header_fsid (leaf), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(leaf),
@@ -1378,7 +1378,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (root->node, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (root->node), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE );btrfs_mark_buffer_dirty (root->node);btrfs_tree_unlock (root->node);
fs/btrfs/ioctl.c +1 -1
@@ -426,7 +426,7 @@ static noinline int create_subvol(struct inode *dir,btrfs_set_header_owner (leaf, objectid);write_extent_buffer (leaf, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (leaf), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(leaf),
Signature · 1 line
1.7.7.6
Quoted 4 lines · Ross Kirk
Remove unused parameter, 'eb'. Unused since introduction in
5f39d397dfbe140a14edecd4e73c34ce23c4f9eeSigned-off-by Ross Kirk <[email protected]>
A few points; was this against latest upstream?
Upstream, fba6aa75654394fccf2530041e9451414c28084f removed all the superfluous (unsigned long) casts when this function gets called. So I think you need to rebase this.
(that commit would be great to apply to userspace as well to keep things more in sync).
But it seems like this could be cleaned up even more:
static inline unsigned long btrfs_header_fsid(struct extent_buffer *eb)
{
return offsetof(struct btrfs_header, fsid);
}really? We have a function which just returns a static value from offsetof?
And to a caveman-code-reader like me, I'd sure expect "btrfs_header_fsid" to give me an fsid, not an offset of a structure member. :(
And as for types, I'm not sure why write_extent_buffer takes an unsigned long for start; if nothing else it seems to actually be used as a size_t inside the function. Argh.
Well -
I suppose for now, removing the unused var is a decent start, after you rebase.
btrfs_header_chunk_tree_uuid() could get similar treatments in kernelspace and/or userspace. As could btrfs_leaf_data().
Welcome to "peeling the onion." :)
-Eric
Quoted 114 lines
--- fs/btrfs/ctree.c | 10 +++++----- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/ioctl.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)fs/btrfs/ctree.c +5
-5@@ -275,7 +275,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,btrfs_set_header_owner (cow, new_root_objectid);write_extent_buffer (cow, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (cow), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE );WARN_ON (btrfs_header_generation (buf) > trans->transid);@@ -1047,7 +1047,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,btrfs_set_header_owner (cow, root->root_key.objectid);write_extent_buffer (cow, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (cow), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); ret =update_ref_for_cow (trans, root, buf, cow, &last_ref);@@ -3145,7 +3145,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,btrfs_set_header_owner (c, root->root_key.objectid);write_extent_buffer (c, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (c), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(c, root->fs_info->chunk_tree_uuid,@@ -3285,7 +3285,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (split,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (split, root->root_key.objectid);write_extent_buffer (split, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (split), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(split, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(split),@@ -4041,7 +4041,7 @@ again:btrfs_set_header_owner (right, root->root_key.objectid);btrfs_set_header_level (right,0 );write_extent_buffer (right, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (right), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(right, root->fs_info->chunk_tree_uuid,fs/btrfs/ctree.h +1
-1@@ -2602,7 +2602,7 @@ static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb,btrfs_set_header_flags (eb, flags); } -static inline u8 *btrfs_header_fsid (struct extent_buffer *eb) +static inline u8 *btrfs_header_fsid (void ) {unsigned long ptr = offsetof(struct btrfs_header , fsid);return (u8 *)ptr;fs/btrfs/disk-io.c +3
-3@@ -497,7 +497,7 @@ static int check_tree_block_fsid(struct btrfs_root *root,u8 fsid[BTRFS_UUID_SIZE ];int ret =1 ; -read_extent_buffer (eb, fsid, (unsigned long )btrfs_header_fsid (eb), +read_extent_buffer (eb, fsid, (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE );while (fs_devices) {if (!memcmp (fsid, fs_devices->fsid,BTRFS_FSID_SIZE )) {@@ -1291,7 +1291,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (leaf, fs_info->fsid, - (unsigned long )btrfs_header_fsid (leaf), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(leaf),@@ -1378,7 +1378,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (root->node, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (root->node), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE );btrfs_mark_buffer_dirty (root->node);btrfs_tree_unlock (root->node);fs/btrfs/ioctl.c +1
-1@@ -426,7 +426,7 @@ static noinline int create_subvol(struct inode *dir,btrfs_set_header_owner (leaf, objectid);write_extent_buffer (leaf, root->fs_info->fsid, - (unsigned long )btrfs_header_fsid (leaf), + (unsigned long )btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(leaf),
PATCH v2 1/1 btrfs: remove unused parameter from btrfs_header_fsid
In reply to Ross KirkRemove unused parameter, 'eb'. Unused since introduction in 5f39d397dfbe140a14edecd4e73c34ce23c4f9ee
Updated to be rebased against current upstream.
--- fs/btrfs/ctree.c | 10 +++++----- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/ioctl.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
fs/btrfs/ctree.c +5 -5
@@ -274,7 +274,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, new_root_objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE );WARN_ON (btrfs_header_generation (buf) > trans->transid);
@@ -996,7 +996,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, root->root_key.objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); ret =update_ref_for_cow (trans, root, buf, cow, &last_ref);
@@ -3148,7 +3148,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (c,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (c, root->root_key.objectid); -write_extent_buffer (c, root->fs_info->fsid,btrfs_ (c), +write_extent_buffer (c, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(c, root->fs_info->chunk_tree_uuid,
@@ -3287,7 +3287,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (split,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (split, root->root_key.objectid);write_extent_buffer (split, root->fs_info->fsid, -btrfs_ (split),BTRFS_FSID_SIZE ); +btrfs_ (),BTRFS_FSID_SIZE );write_extent_buffer (split, root->fs_info->chunk_tree_uuid,btrfs_header_chunk_tree_uuid (split),BTRFS_UUID_SIZE );
@@ -4042,7 +4042,7 @@ again:btrfs_set_header_owner (right, root->root_key.objectid);btrfs_set_header_level (right,0 );write_extent_buffer (right, root->fs_info->fsid, -btrfs_ (right),BTRFS_FSID_SIZE ); +btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(right, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(right),
fs/btrfs/ctree.h +1 -1
@@ -2665,7 +2665,7 @@ static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb,btrfs_set_header_flags (eb, flags); } -static inline unsigned long btrfs_ (struct extent_buffer *eb) +static inline unsigned long btrfs_ (void ) {return offsetof(struct btrfs_header , fsid); }
fs/btrfs/disk-io.c +3 -3
@@ -496,7 +496,7 @@ static int check_tree_block_fsid(struct btrfs_root *root,u8 fsid[BTRFS_UUID_SIZE ];int ret =1 ; -read_extent_buffer (eb, fsid,btrfs_ (eb),BTRFS_FSID_SIZE ); +read_extent_buffer (eb, fsid,btrfs_ (),BTRFS_FSID_SIZE );while (fs_devices) {if (!memcmp (fsid, fs_devices->fsid,BTRFS_FSID_SIZE )) { ret =0 ;
@@ -1292,7 +1292,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,btrfs_set_header_owner (leaf, objectid); root->node = leaf; -write_extent_buffer (leaf, fs_info->fsid,btrfs_ (leaf), +write_extent_buffer (leaf, fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf),
@@ -1379,7 +1379,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (root->node, root->fs_info->fsid, -btrfs_ (root->node),BTRFS_FSID_SIZE ); +btrfs_ (),BTRFS_FSID_SIZE );btrfs_mark_buffer_dirty (root->node);btrfs_tree_unlock (root->node);return root;
fs/btrfs/ioctl.c +1 -1
@@ -436,7 +436,7 @@ static noinline int create_subvol(struct inode *dir,btrfs_set_header_backref_rev (leaf,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (leaf, objectid); -write_extent_buffer (leaf, root->fs_info->fsid,btrfs_ (leaf), +write_extent_buffer (leaf, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf),
Signature · 1 line
1.7.7.6
PATCH v3 1/1 btrfs: remove unused parameter from btrfs_header_fsid
Remove unused parameter, 'eb'. Unused since introduction in 5f39d397dfbe140a14edecd4e73c34ce23c4f9ee
Updated to be rebased against current upstream and correct diff supplied this time!
--- fs/btrfs/ctree.c | 10 +++++----- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/ioctl.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
fs/btrfs/ctree.c +5 -5
@@ -274,7 +274,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, new_root_objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE );WARN_ON (btrfs_header_generation (buf) > trans->transid);
@@ -996,7 +996,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, root->root_key.objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); ret =update_ref_for_cow (trans, root, buf, cow, &last_ref);
@@ -3148,7 +3148,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (c,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (c, root->root_key.objectid); -write_extent_buffer (c, root->fs_info->fsid,btrfs_header_fsid (c), +write_extent_buffer (c, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(c, root->fs_info->chunk_tree_uuid,
@@ -3287,7 +3287,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (split,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (split, root->root_key.objectid);write_extent_buffer (split, root->fs_info->fsid, -btrfs_header_fsid (split),BTRFS_FSID_SIZE ); +btrfs_header_fsid (),BTRFS_FSID_SIZE );write_extent_buffer (split, root->fs_info->chunk_tree_uuid,btrfs_header_chunk_tree_uuid (split),BTRFS_UUID_SIZE );
@@ -4042,7 +4042,7 @@ again:btrfs_set_header_owner (right, root->root_key.objectid);btrfs_set_header_level (right,0 );write_extent_buffer (right, root->fs_info->fsid, -btrfs_header_fsid (right),BTRFS_FSID_SIZE ); +btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(right, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(right),
fs/btrfs/ctree.h +1 -1
@@ -2665,7 +2665,7 @@ static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb,btrfs_set_header_flags (eb, flags); } -static inline unsigned long btrfs_header_fsid (struct extent_buffer *eb) +static inline unsigned long btrfs_header_fsid (void ) {return offsetof(struct btrfs_header , fsid); }
fs/btrfs/disk-io.c +3 -3
@@ -496,7 +496,7 @@ static int check_tree_block_fsid(struct btrfs_root *root,u8 fsid[BTRFS_UUID_SIZE ];int ret =1 ; -read_extent_buffer (eb, fsid,btrfs_header_fsid (eb),BTRFS_FSID_SIZE ); +read_extent_buffer (eb, fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE );while (fs_devices) {if (!memcmp (fsid, fs_devices->fsid,BTRFS_FSID_SIZE )) { ret =0 ;
@@ -1292,7 +1292,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,btrfs_set_header_owner (leaf, objectid); root->node = leaf; -write_extent_buffer (leaf, fs_info->fsid,btrfs_header_fsid (leaf), +write_extent_buffer (leaf, fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf),
@@ -1379,7 +1379,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (root->node, root->fs_info->fsid, -btrfs_header_fsid (root->node),BTRFS_FSID_SIZE ); +btrfs_header_fsid (),BTRFS_FSID_SIZE );btrfs_mark_buffer_dirty (root->node);btrfs_tree_unlock (root->node);return root;
fs/btrfs/ioctl.c +1 -1
@@ -436,7 +436,7 @@ static noinline int create_subvol(struct inode *dir,btrfs_set_header_backref_rev (leaf,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (leaf, objectid); -write_extent_buffer (leaf, root->fs_info->fsid,btrfs_header_fsid (leaf), +write_extent_buffer (leaf, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf),
Signature · 1 line
1.7.7.6
Quoted 4 lines · Ross Kirk
Remove unused parameter, 'eb'. Unused since introduction in
5f39d397dfbe140a14edecd4e73c34ce23c4f9eeUpdated to be rebased against current upstream and correct diff supplied this time!
Ah, V3 -was- awesome. Sorry for not seeing it first.
Quoted 116 lines
Signed-off-by Ross Kirk <[email protected]>--- fs/btrfs/ctree.c | 10 +++++----- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/ioctl.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)fs/btrfs/ctree.c +5
-5@@ -274,7 +274,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, new_root_objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE );WARN_ON (btrfs_header_generation (buf) > trans->transid);@@ -996,7 +996,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, root->root_key.objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); ret =update_ref_for_cow (trans, root, buf, cow, &last_ref);@@ -3148,7 +3148,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (c,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (c, root->root_key.objectid); -write_extent_buffer (c, root->fs_info->fsid,btrfs_header_fsid (c), +write_extent_buffer (c, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(c, root->fs_info->chunk_tree_uuid,@@ -3287,7 +3287,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (split,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (split, root->root_key.objectid);write_extent_buffer (split, root->fs_info->fsid, -btrfs_header_fsid (split),BTRFS_FSID_SIZE ); +btrfs_header_fsid (),BTRFS_FSID_SIZE );write_extent_buffer (split, root->fs_info->chunk_tree_uuid,btrfs_header_chunk_tree_uuid (split),BTRFS_UUID_SIZE );@@ -4042,7 +4042,7 @@ again:btrfs_set_header_owner (right, root->root_key.objectid);btrfs_set_header_level (right,0 );write_extent_buffer (right, root->fs_info->fsid, -btrfs_header_fsid (right),BTRFS_FSID_SIZE ); +btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(right, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(right),fs/btrfs/ctree.h +1
-1@@ -2665,7 +2665,7 @@ static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb,btrfs_set_header_flags (eb, flags); } -static inline unsigned long btrfs_header_fsid (struct extent_buffer *eb) +static inline unsigned long btrfs_header_fsid (void ) {return offsetof(struct btrfs_header , fsid); }fs/btrfs/disk-io.c +3
-3@@ -496,7 +496,7 @@ static int check_tree_block_fsid(struct btrfs_root *root,u8 fsid[BTRFS_UUID_SIZE ];int ret =1 ; -read_extent_buffer (eb, fsid,btrfs_header_fsid (eb),BTRFS_FSID_SIZE ); +read_extent_buffer (eb, fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE );while (fs_devices) {if (!memcmp (fsid, fs_devices->fsid,BTRFS_FSID_SIZE )) { ret =0 ;@@ -1292,7 +1292,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,btrfs_set_header_owner (leaf, objectid); root->node = leaf; -write_extent_buffer (leaf, fs_info->fsid,btrfs_header_fsid (leaf), +write_extent_buffer (leaf, fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf),@@ -1379,7 +1379,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (root->node, root->fs_info->fsid, -btrfs_header_fsid (root->node),BTRFS_FSID_SIZE ); +btrfs_header_fsid (),BTRFS_FSID_SIZE );btrfs_mark_buffer_dirty (root->node);btrfs_tree_unlock (root->node);return root;fs/btrfs/ioctl.c +1
-2@@ -436,7 +436,7 @@ static noinline int create_subvol(struct inode *dir,btrfs_set_header_backref_rev (leaf,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (leaf, objectid); -write_extent_buffer (leaf, root->fs_info->fsid,btrfs_header_fsid (leaf), +write_extent_buffer (leaf, root->fs_info->fsid,btrfs_header_fsid (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf), -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Ross Kirk
Remove unused parameter, 'eb'. Unused since introduction in
5f39d397dfbe140a14edecd4e73c34ce23c4f9eeUpdated to be rebased against current upstream.
This doesn't apply...
Review
Quoted 2 lines
(quoted diff) +1
-1- write_extent_buffer(cow, root->fs_info->fsid, btrfs_(cow), + write_extent_buffer(cow, root->fs_info->fsid, btrfs_(),
looks like some global search & replace went wrong - btrfs_(cow) ?
Always good to test compile (& test!) before sending. ;)
V3 will be awesome. :)
-Eric
Quoted 116 lines
Signed-off-by Ross Kirk <[email protected]>--- fs/btrfs/ctree.c | 10 +++++----- fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/ioctl.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)fs/btrfs/ctree.c +5
-5@@ -274,7 +274,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, new_root_objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE );WARN_ON (btrfs_header_generation (buf) > trans->transid);@@ -996,7 +996,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,else btrfs_set_header_owner (cow, root->root_key.objectid); -write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (cow), +write_extent_buffer (cow, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); ret =update_ref_for_cow (trans, root, buf, cow, &last_ref);@@ -3148,7 +3148,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (c,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (c, root->root_key.objectid); -write_extent_buffer (c, root->fs_info->fsid,btrfs_ (c), +write_extent_buffer (c, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(c, root->fs_info->chunk_tree_uuid,@@ -3287,7 +3287,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,btrfs_set_header_backref_rev (split,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (split, root->root_key.objectid);write_extent_buffer (split, root->fs_info->fsid, -btrfs_ (split),BTRFS_FSID_SIZE ); +btrfs_ (),BTRFS_FSID_SIZE );write_extent_buffer (split, root->fs_info->chunk_tree_uuid,btrfs_header_chunk_tree_uuid (split),BTRFS_UUID_SIZE );@@ -4042,7 +4042,7 @@ again:btrfs_set_header_owner (right, root->root_key.objectid);btrfs_set_header_level (right,0 );write_extent_buffer (right, root->fs_info->fsid, -btrfs_ (right),BTRFS_FSID_SIZE ); +btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(right, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(right),fs/btrfs/ctree.h +1
-1@@ -2665,7 +2665,7 @@ static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb,btrfs_set_header_flags (eb, flags); } -static inline unsigned long btrfs_ (struct extent_buffer *eb) +static inline unsigned long btrfs_ (void ) {return offsetof(struct btrfs_header , fsid); }fs/btrfs/disk-io.c +3
-3@@ -496,7 +496,7 @@ static int check_tree_block_fsid(struct btrfs_root *root,u8 fsid[BTRFS_UUID_SIZE ];int ret =1 ; -read_extent_buffer (eb, fsid,btrfs_ (eb),BTRFS_FSID_SIZE ); +read_extent_buffer (eb, fsid,btrfs_ (),BTRFS_FSID_SIZE );while (fs_devices) {if (!memcmp (fsid, fs_devices->fsid,BTRFS_FSID_SIZE )) { ret =0 ;@@ -1292,7 +1292,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,btrfs_set_header_owner (leaf, objectid); root->node = leaf; -write_extent_buffer (leaf, fs_info->fsid,btrfs_ (leaf), +write_extent_buffer (leaf, fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf),@@ -1379,7 +1379,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, root->node = leaf;write_extent_buffer (root->node, root->fs_info->fsid, -btrfs_ (root->node),BTRFS_FSID_SIZE ); +btrfs_ (),BTRFS_FSID_SIZE );btrfs_mark_buffer_dirty (root->node);btrfs_tree_unlock (root->node);return root;fs/btrfs/ioctl.c +1
-2@@ -436,7 +436,7 @@ static noinline int create_subvol(struct inode *dir,btrfs_set_header_backref_rev (leaf,BTRFS_MIXED_BACKREF_REV );btrfs_set_header_owner (leaf, objectid); -write_extent_buffer (leaf, root->fs_info->fsid,btrfs_ (leaf), +write_extent_buffer (leaf, root->fs_info->fsid,btrfs_ (),BTRFS_FSID_SIZE ); write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, btrfs_header_chunk_tree_uuid(leaf), -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html