summaryrefslogtreecommitdiff
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2013-08-19 18:51:13 +0200
committerChris Mason <chris.mason@fusionio.com>2013-09-01 08:16:02 -0400
commitbbb651e469d99f0088e286fdeb54acca7bb4ad4e (patch)
tree303a1cc7643df7b96ca367b3d42ab7089e9b8321 /fs/btrfs/volumes.c
parent68b823ef41f17b05ce8d04e10f0635e068451f6c (diff)
Btrfs: don't allow the replace procedure on read only filesystems
If you start the replace procedure on a read only filesystem, at the end the procedure fails to write the updated dev_items to the chunk tree. The problem is that this error is not indicated except for a WARN_ON(). If the user now thinks that everything was done as expected and destroys the source device (with mkfs or with a hammer). The next mount fails with "failed to read chunk root" and the filesystem is gone. This commit adds code to fail the attempt to start the replace procedure if the filesystem is mounted read-only. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
0 files changed, 0 insertions, 0 deletions