Btrfs: add device counters for detected IO and checksum errors
authorStefan Behrens <sbehrens@giantdisaster.de>
Fri, 25 May 2012 14:06:08 +0000 (16:06 +0200)
committerJosef Bacik <josef@redhat.com>
Wed, 30 May 2012 14:23:39 +0000 (10:23 -0400)
commit442a4f6308e694e0fa6025708bd5e4e424bbf51c
treee782db1bcbec25283048d77871e0bed7ad04567c
parentd07eb9117050c9ed3f78296ebcc06128b52693be
Btrfs: add device counters for detected IO and checksum errors

The goal is to detect when drives start to get an increased error rate,
when drives should be replaced soon. Therefore statistic counters are
added that count IO errors (read, write and flush). Additionally, the
software detected errors like checksum errors and corrupted blocks are
counted.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/ioctl.h
fs/btrfs/scrub.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h