* [PATCH] btrfs-progs: fix check of running scrub
@ 2015-01-19 18:01 David Sterba
0 siblings, 0 replies; only message in thread
From: David Sterba @ 2015-01-19 18:01 UTC (permalink / raw)
To: linux-btrfs; +Cc: zab, David Sterba
Scrub on multiple devices may report wrong status if scrub finishes
early on one of them.
Reported-by: Sandy McArthur Jr <sandymac@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
---
cmds-scrub.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/cmds-scrub.c b/cmds-scrub.c
index eb50d8a65708..06c2a306f3b2 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -1073,15 +1073,11 @@ static int is_scrub_running_in_kernel(int fd,
memset(&sp, 0, sizeof(sp));
sp.scrub_args.devid = di_args[i].devid;
ret = ioctl(fd, BTRFS_IOC_SCRUB_PROGRESS, &sp.scrub_args);
- if (ret < 0 && errno == ENODEV)
- continue;
- if (ret < 0 && errno == ENOTCONN)
- return 0;
if (!ret)
return 1;
}
- return 1;
+ return 0;
}
static const char * const cmd_scrub_start_usage[];
--
2.1.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-19 18:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 18:01 [PATCH] btrfs-progs: fix check of running scrub David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).