summaryrefslogtreecommitdiff
path: root/btrfs-convert.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-08-23 17:46:25 +0200
committerDavid Sterba <dsterba@suse.com>2016-08-24 14:37:36 +0200
commit3c3c59f07725b97d1876d32a2e7945dbd387d30d (patch)
treeba0ea1f30ae4f79dc1bc217988289989e7e2b93f /btrfs-convert.c
parent52df1d80a35a656c8d57509effb307bc20f5cbdf (diff)
btrfs-progs: convert: move convert_read_used_space
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-convert.c')
-rw-r--r--btrfs-convert.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/btrfs-convert.c b/btrfs-convert.c
index b4278a9f..50e45a18 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -920,6 +920,22 @@ out:
}
/*
+ * Read used space, and since we have the used space,
+ * calcuate data_chunks and free for later mkfs
+ */
+static int convert_read_used_space(struct btrfs_convert_context *cctx)
+{
+ int ret;
+
+ ret = cctx->convert_ops->read_used_space(cctx);
+ if (ret)
+ return ret;
+
+ ret = calculate_available_space(cctx);
+ return ret;
+}
+
+/*
* Open Ext2fs in readonly mode, read block allocation bitmap and
* inode bitmap into memory.
*/
@@ -2257,22 +2273,6 @@ static int convert_open_fs(const char *devname,
return -1;
}
-/*
- * Read used space, and since we have the used space,
- * calcuate data_chunks and free for later mkfs
- */
-static int convert_read_used_space(struct btrfs_convert_context *cctx)
-{
- int ret;
-
- ret = cctx->convert_ops->read_used_space(cctx);
- if (ret)
- return ret;
-
- ret = calculate_available_space(cctx);
- return ret;
-}
-
static int do_convert(const char *devname, int datacsum, int packing,
int noxattr, u32 nodesize, int copylabel, const char *fslabel,
int progress, u64 features)