diff options
author | Qu Wenruo <wqu@suse.com> | 2017-10-19 15:12:58 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-08 18:15:13 +0100 |
commit | c28418daed603d4943edc8b213b91f8d1e2b9fe3 (patch) | |
tree | f91031c23a232d8613c7ad578b50392c45c62001 /mkfs/main.c | |
parent | 599a0abed5649727dc3b6ec4ec373ba30253df45 (diff) |
btrfs-progs: mkfs/rootdir: Shrink fs for rootdir option
Use the new dev extent based shrink method for rootdir option. This
restores the original behaviour when --rootdir will create a minimal
filesystem size.
Signed-off-by: Qu Wenruo <wqu@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mkfs/main.c')
-rw-r--r-- | mkfs/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mkfs/main.c b/mkfs/main.c index c383e241..e9136b10 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -1189,6 +1189,11 @@ raid_groups: error("error wihle filling filesystem: %d", ret); goto out; } + ret = btrfs_mkfs_shrink_fs(fs_info, NULL); + if (ret < 0) { + error("error while shrinking filesystem: %d", ret); + goto out; + } } if (verbose) { |