diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2013-08-19 20:51:13 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-27 04:18:27 +0400 |
commit | 42cc8e56740efe9acc271f4780b81ac5ecef188c (patch) | |
tree | 74398f595fec34e75698e536b25fd4c75b40a78d /include/net/flow.h | |
parent | d2310f7119ba394d3256c221886c048189dcfb91 (diff) | |
download | linux-42cc8e56740efe9acc271f4780b81ac5ecef188c.tar.xz |
Btrfs: don't allow the replace procedure on read only filesystems
commit bbb651e469d99f0088e286fdeb54acca7bb4ad4e upstream.
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>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/flow.h')
0 files changed, 0 insertions, 0 deletions