dump.f2fs: allow dump data on mounted image
authorChao Yu <yuchao0@huawei.com>
Sun, 30 Sep 2018 08:26:13 +0000 (16:26 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 21 Nov 2018 19:38:23 +0000 (11:38 -0800)
xfstests assumes it's allow to dump data on mounted image, for example,
some common functions call dumpe2fs on mounted ext[2|3|4] image to check
feature lists. To adapt such requirement, let's follow that rule in
dump.f2fs.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/main.c

index 2cf6faa..399397b 100644 (file)
@@ -747,7 +747,7 @@ int main(int argc, char **argv)
 
        f2fs_parse_options(argc, argv);
 
-       if (f2fs_devs_are_umounted() < 0) {
+       if (c.func != DUMP && f2fs_devs_are_umounted() < 0) {
                if (errno == EBUSY)
                        return -1;
                if (!c.ro || c.func == DEFRAG) {