diff options
author | Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com> | 2016-03-29 21:17:48 (GMT) |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-04-04 14:29:22 (GMT) |
commit | 7ccefb98ce3e5c4493cd213cd03714b7149cf0cb (patch) | |
tree | ebb69df1683d9fa1118d26c7cb047a8621dd198f /net/rose | |
parent | 0f5dcf8de974db5970d48d12a202997baa2846a1 (diff) | |
download | linux-7ccefb98ce3e5c4493cd213cd03714b7149cf0cb.tar.xz |
btrfs: Reset IO error counters before start of device replacing
If device replace entry was found on disk at mounting and its num_write_errors
stats counter has non-NULL value, then replace operation will never be
finished and -EIO error will be reported by btrfs_scrub_dev() because
this counter is never reset.
# mount -o degraded /media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/
# btrfs replace status /media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/
Started on 25.Mar 07:28:00, canceled on 25.Mar 07:28:01 at 0.0%, 40 write errs, 0 uncorr. read errs
# btrfs replace start -B 4 /dev/sdg /media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/
ERROR: ioctl(DEV_REPLACE_START) failed on "/media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/": Input/output error, no error
Reset num_write_errors and num_uncorrectable_read_errors counters in the
dev_replace structure before start of replacing.
Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'net/rose')
0 files changed, 0 insertions, 0 deletions