btrfs-progs/mkfs
Qu Wenruo 0855a8cd43 btrfs-progs: mkfs: fix regression preventing --rootdir to create file
Commit 460e93f25754 ("btrfs-progs: mkfs: check the status of file at mkfs")
will try to check the file state before creating fs on it.

The check is mostly fine for normal mkfs case, while for --rootdir
option, it's allowed to create a new file if the destination file
doesn't exist.

Fix it by allowing non-existent file if --rootdir is specified.

Fixes: 460e93f25754 ("btrfs-progs: mkfs: check the status of file at mkfs")
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-08 18:15:16 +01:00
..
common.c btrfs-progs: mkfs: Enhance minimal device size calculation to fix mkfs failure on small file 2018-01-03 17:10:11 +01:00
common.h btrfs-progs: mkfs: Enhance minimal device size calculation to fix mkfs failure on small file 2018-01-03 17:10:11 +01:00
main.c btrfs-progs: mkfs: fix regression preventing --rootdir to create file 2018-01-08 18:15:16 +01:00
rootdir.c btrfs-progs: mkfs: Separate shrink from rootdir 2018-01-08 18:15:15 +01:00
rootdir.h btrfs-progs: mkfs: Separate shrink from rootdir 2018-01-08 18:15:15 +01:00