path: root/utils.c
diff options
authorDavid Sterba <>2017-01-24 19:36:15 +0100
committerDavid Sterba <>2017-01-27 12:20:43 +0100
commitc855e60f7ef8f980a465bcadc72caeba70fd10b7 (patch)
treea953b93897bfda025b0c36cc30212c35c7b777ce /utils.c
parent78e1787c55a28f496d210b2805d84539d86552a1 (diff)
btrfs-progs: mkfs/convert: separate the convert part from make_btrfs
The regulare mkfs_btrfs does not anything special about convert and just passes the arguments. Make that two functions. Signed-off-by: David Sterba <>
Diffstat (limited to 'utils.c')
1 files changed, 2 insertions, 5 deletions
diff --git a/utils.c b/utils.c
index 26493c56..5a481976 100644
--- a/utils.c
+++ b/utils.c
@@ -943,7 +943,7 @@ out:
* Split into small blocks and reuse codes.
* TODO: Reuse tree operation facilities by introducing new flags
-static int make_convert_btrfs(int fd, struct btrfs_mkfs_config *cfg,
+int make_convert_btrfs(int fd, struct btrfs_mkfs_config *cfg,
struct btrfs_convert_context *cctx)
struct cache_tree *free = &cctx->free;
@@ -1052,8 +1052,7 @@ out:
* The superblock signature is not valid, denotes a partially created
* filesystem, needs to be finalized.
-int make_btrfs(int fd, struct btrfs_mkfs_config *cfg,
- struct btrfs_convert_context *cctx)
+int make_btrfs(int fd, struct btrfs_mkfs_config *cfg)
struct btrfs_super_block super;
struct extent_buffer *buf;
@@ -1078,8 +1077,6 @@ int make_btrfs(int fd, struct btrfs_mkfs_config *cfg,
u64 num_bytes;
- if (cctx)
- return make_convert_btrfs(fd, cfg, cctx);
buf = malloc(sizeof(*buf) + max(cfg->sectorsize, cfg->nodesize));
if (!buf)
return -ENOMEM;