Skip to contentSkip to conversation

dump.f2fs: allow dump data on mounted image

PATCH New Chao Yu 1 participant 1 message Sep 30, 2018

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 dump.f2fs: allow dump data on mounted image

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.

---
 fsck/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fsck/main.c +1 -1
index e20f31ca09e4..675c603b1a76 100644
@@ -744,7 +744,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) {
Signature · 1 line
2.18.0.rc1