From: Nikolay Borisov <nborisov@suse.com>
To: Philip Seeger <philip@philip-seeger.de>,
Graham Cobb <g.btrfs@cobb.uk.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Monitoring not working as "dev stats" returns 0 after read error occurred
Date: Thu, 9 Jan 2020 14:04:20 +0200 [thread overview]
Message-ID: <2a9bf923-e7b9-9d82-5f1d-bbdfc192978e@suse.com> (raw)
In-Reply-To: <ac61f79a3c373f319232640db5db9a5e@philip-seeger.de>
On 9.01.20 г. 12:33 ч., Philip Seeger wrote:
> On 2020-01-08 20:35, Graham Cobb wrote:
>>> BTRFS info (device sda3): read error corrected: ino 194473 off 2170880
>>
>> I am not convinced that that message is telling you that the error
>> happened on device sda3. Certainly in some other cases Btrfs error
>> messages identify the **filesystem** using the name of the device the
>> kernel thinks is mounted, which might be sda3.
>
> You're right, it looks like I copied the wrong piece, my bad. This btrfs
> filesystem is a mirror with two drives:
>
> # btrfs fi show / | grep devid
> devid 1 size 100.00GiB used 81.03GiB path /dev/sda3
> devid 2 size 100.00GiB used 81.03GiB path /dev/nvme0n1p3
>
> And this is from dmesg:
>
> print_req_error: critical medium error, dev nvme0n1, sector 40910720
> flags 84700
> BTRFS info (device sda3): read error corrected: ino 194473 off 2134016
> (dev /dev/nvme0n1p3 sector 36711808)
>
> So it's nvme0n1 that's about to die. But it doesn't matter, dev stats
> prints 0 for all error counts as if nothing had ever happened.
>
According to the log provided the error returned from the NVME device is
BLK_STS_MEDIUM/-ENODATA hence the "critical medium" string there. Btrfs'
code OTOH only logs error in case we it gets STS_IOERR or STS_TARGET
from the block layer. It seems there are other error codes which are
also ignored but can signify errors e.g. STS_NEXUS/STS_TRANSPORT.
So as it stands this is expected but I'm not sure it's correct behavior,
perhaps we need to extend the range of conditions we record as errors.
Thanks for the report.
<snip>
next prev parent reply other threads:[~2020-01-09 12:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 17:41 Monitoring not working as "dev stats" returns 0 after read error occurred philip
2020-01-08 19:35 ` Graham Cobb
2020-01-09 10:33 ` Philip Seeger
2020-01-09 12:04 ` Nikolay Borisov [this message]
2020-01-09 14:34 ` Philip Seeger
2020-01-09 23:50 ` Philip Seeger
2020-01-11 7:42 ` Andrei Borzenkov
2020-01-12 11:42 ` Philip Seeger
2020-01-12 17:39 ` waxhead
2020-01-12 20:27 ` Chris Murphy
2020-01-12 22:45 ` Philip Seeger
2020-01-08 21:47 ` Chris Murphy
2020-01-09 10:49 ` Philip Seeger
2020-01-16 1:16 ` Zygo Blaxell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a9bf923-e7b9-9d82-5f1d-bbdfc192978e@suse.com \
--to=nborisov@suse.com \
--cc=g.btrfs@cobb.uk.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=philip@philip-seeger.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox