btrfs: don't report user-requested cancel as an error
authorAnand Jain <anand.jain@oracle.com>
Tue, 20 Nov 2018 11:56:16 +0000 (19:56 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:36 +0000 (14:51 +0100)
As of now only user requested replace cancel can cancel the
replace-scrub so no need to log the error.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c

index ead4f380352744f275c799637790b8b7bf242057..3b272ff60fea750b57745b6b4705602d83b5bb97 100644 (file)
@@ -629,7 +629,8 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
                                                                src_device,
                                                                tgt_device);
        } else {
                                                                src_device,
                                                                tgt_device);
        } else {
-               btrfs_err_in_rcu(fs_info,
+               if (scrub_ret != -ECANCELED)
+                       btrfs_err_in_rcu(fs_info,
                                 "btrfs_scrub_dev(%s, %llu, %s) failed %d",
                                 btrfs_dev_name(src_device),
                                 src_device->devid,
                                 "btrfs_scrub_dev(%s, %llu, %s) failed %d",
                                 btrfs_dev_name(src_device),
                                 src_device->devid,