btrfs-progs: mkfs: Only zero out the first 1M for rootdir
authorQu Wenruo <wqu@suse.com>
Thu, 19 Oct 2017 06:16:17 +0000 (14:16 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 3 Jan 2018 16:29:19 +0000 (17:29 +0100)
commit6dd8669a1c52cae1d827d934fbe6171f4893f1ba
tree9fe479a09b0a2aa61c2d666e2177d5b0d7533121
parent31d228a2eb98d95637338bf77b5abcd375614d15
btrfs-progs: mkfs: Only zero out the first 1M for rootdir

It's a waste of IO to fill the whole image before creating btrfs on it,
just wiping the first 1M, and then write 1 byte to the last position to
create a sparse file.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
mkfs/main.c