summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>2014-07-07 09:54:52 +0800
committerDavid Sterba <dsterba@suse.cz>2014-08-22 16:09:55 +0200
commit3db4c0a3d35dd5f81a4c1d405ef7f3ca3357ae03 (patch)
tree196cad3ced3fda970e511b41e5688387e9fcba45 /disk-io.c
parentcfee4bc139ccb0e1332ec5f108ecb9dd1932e451 (diff)
btrfs-progs: add ask_user confirmation for btrfstune clear seeding flag
If we do the following: # mkfs.btrfs -f <dev> # mount <dev> <mnt> # dd if=/dev/urandom of=<mnt>/data bs=1M count=100 # umount <dev> # btrfstune -S 1 <dev> <--- make seeding device # mount <dev> <mnt> # btrfs dev add -f <dev2> <mnt> # umount <dev> # btrfstune -S 0 <dev> <--- clear seeding flag # mount <dev2> <mnt> <=== new device not mountable When mounting the new device, btrfs will check whether the seeding flag is set when try to open seeding device. If the user clears the seeding flag of the seeding device, the new device will not be mountable. Even set the seeding flag back will not recovery this problem, because the generation has been changed. So clear the seeding flag has the chance to damage the derived new fs. So I add user confirmation check when clearing seeding flag. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'disk-io.c')
0 files changed, 0 insertions, 0 deletions