]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/btrfs/volumes.c
btrfs: device stats, log when stats are zeroed
authorAnand Jain <anand.jain@oracle.com>
Fri, 10 Jan 2020 04:26:34 +0000 (12:26 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 20 Jan 2020 15:41:02 +0000 (16:41 +0100)
commita69976bc69308aa475d0ba3b8b3efd1d013c0460
tree6e811c4cb54e6c4111851f8642514b1a5175e899
parent556755a8a99be8ca3cd9fbe36aaf9b3b0339a00d
btrfs: device stats, log when stats are zeroed

We had a report indicating that some read errors aren't reported by the
device stats in the userland. It is important to have the errors
reported in the device stat as user land scripts might depend on it to
take the reasonable corrective actions. But to debug these issue we need
to be really sure that request to reset the device stat did not come
from the userland itself. So log an info message when device error reset
happens.

For example:
 BTRFS info (device sdc): device stats zeroed by btrfs(9223)

Reported-by: philip@philip-seeger.de
Link: https://www.spinics.net/lists/linux-btrfs/msg96528.html
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
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/volumes.c