@@ -335,7 +335,7 @@ int main(int argc, char **argv)
struct btrfs_find_root_filter filter = {0};
struct cache_tree result;
struct cache_extent *found;
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
int ret;
/* Default to search root tree */
@@ -9983,7 +9983,7 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
{
struct cache_tree root_cache;
struct btrfs_root *root;
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
u64 bytenr = 0;
u64 subvolid = 0;
u64 tree_root_bytenr = 0;
@@ -636,7 +636,7 @@ static int map_seed_devices(struct list_head *all_uuids)
fs_uuids = btrfs_scanned_uuids();
list_for_each_entry(cur_fs, all_uuids, list) {
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
device = list_first_entry(&cur_fs->devices,
struct btrfs_device, dev_list);
@@ -317,7 +317,7 @@ static int cmd_inspect_dump_tree(const struct cmd_struct *cmd,
struct btrfs_disk_key disk_key;
struct btrfs_key found_key;
struct cache_tree block_root; /* for multiple --block parameters */
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
char uuidbuf[BTRFS_UUID_UNPARSED_SIZE];
int ret = 0;
int slot;
@@ -233,7 +233,7 @@ static int cmd_rescue_fix_device_size(const struct cmd_struct *cmd,
int argc, char **argv)
{
struct btrfs_fs_info *fs_info;
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
char *devname;
int ret;
@@ -368,7 +368,7 @@ static int cmd_rescue_clear_uuid_tree(const struct cmd_struct *cmd,
int argc, char **argv)
{
struct btrfs_fs_info *fs_info;
- struct open_ctree_flags ocf = {};
+ struct open_ctree_args ocf = {};
char *devname;
int ret;
@@ -1216,7 +1216,7 @@ static struct btrfs_root *open_fs(const char *dev, u64 root_location,
{
struct btrfs_fs_info *fs_info = NULL;
struct btrfs_root *root = NULL;
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
u64 bytenr;
int i;
@@ -2795,7 +2795,7 @@ static int restore_metadump(const char *input, FILE *out, int old_restore,
/* NOTE: open with write mode */
if (fixup_offset) {
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
ocf.filename = target;
ocf.flags = OPEN_CTREE_WRITES | OPEN_CTREE_RESTORE |
@@ -3223,7 +3223,7 @@ int BOX_MAIN(image)(int argc, char *argv[])
/* extended support for multiple devices */
if (!create && multi_devices) {
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
struct btrfs_fs_info *info;
u64 total_devs;
int i;
@@ -1437,7 +1437,7 @@ int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info,
return 0;
}
-static struct btrfs_fs_info *__open_ctree_fd(int fp, struct open_ctree_flags *ocf)
+static struct btrfs_fs_info *__open_ctree_fd(int fp, struct open_ctree_args *ocf)
{
struct btrfs_fs_info *fs_info;
struct btrfs_super_block *disk_super;
@@ -1608,7 +1608,7 @@ out:
return NULL;
}
-struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_flags *ocf)
+struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_args *ocf)
{
int fp;
int ret;
@@ -1646,7 +1646,7 @@ struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr,
unsigned flags)
{
struct btrfs_fs_info *info;
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
/* This flags may not return fs_info with any valid root */
BUG_ON(flags & OPEN_CTREE_IGNORE_CHUNK_TREE_ERROR);
@@ -1665,7 +1665,7 @@ struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr,
unsigned flags)
{
struct btrfs_fs_info *info;
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
/* This flags may not return fs_info with any valid root */
if (flags & OPEN_CTREE_IGNORE_CHUNK_TREE_ERROR) {
@@ -175,7 +175,7 @@ struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr,
unsigned flags);
struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr,
unsigned flags);
-struct open_ctree_flags {
+struct open_ctree_args {
const char *filename;
u64 sb_bytenr;
u64 root_tree_bytenr;
@@ -183,7 +183,7 @@ struct open_ctree_flags {
unsigned flags;
};
-struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_flags *ocf);
+struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_args *ctree_args);
int close_ctree_fs_info(struct btrfs_fs_info *fs_info);
static inline int close_ctree(struct btrfs_root *root)
{
@@ -990,7 +990,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
struct btrfs_root *root;
struct btrfs_fs_info *fs_info;
struct btrfs_trans_handle *trans;
- struct open_ctree_flags ocf = { 0 };
+ struct open_ctree_args ocf = { 0 };
int ret = 0;
int close_ret;
int i;
The struct open_ctree_flags currently holds arguments for open_ctree_fs_info(), it can be confusing when mixed with a local variable named open_ctree_flags as below. cmds/inspect-dump-tree.c: cmd_inspect_dump_tree() :: struct open_ctree_flags ocf = { 0 }; :: unsigned open_ctree_flags; So rename struct open_ctree_flags to struct open_ctree_args. Signed-off-by: Anand Jain <anand.jain@oracle.com> --- btrfs-find-root.c | 2 +- check/main.c | 2 +- cmds/filesystem.c | 2 +- cmds/inspect-dump-tree.c | 2 +- cmds/rescue.c | 4 ++-- cmds/restore.c | 2 +- image/main.c | 4 ++-- kernel-shared/disk-io.c | 8 ++++---- kernel-shared/disk-io.h | 4 ++-- mkfs/main.c | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-)