Commit 6c3abeda authored by David Sterba's avatar David Sterba

btrfs: scrub: return EAGAIN when fs is closing

The error code used here is wrong as it's not invalid to try to start
scrub when umount has begun.  Returning EAGAIN is more user friendly as
it's recoverable.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 8de60fe9
...@@ -3791,7 +3791,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start, ...@@ -3791,7 +3791,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
struct btrfs_workqueue *scrub_parity = NULL; struct btrfs_workqueue *scrub_parity = NULL;
if (btrfs_fs_closing(fs_info)) if (btrfs_fs_closing(fs_info))
return -EINVAL; return -EAGAIN;
if (fs_info->nodesize > BTRFS_STRIPE_LEN) { if (fs_info->nodesize > BTRFS_STRIPE_LEN) {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment