linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arne Jansen <sensille@gmx.net>
To: Stefan Behrens <sbehrens@giantdisaster.de>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 0/3] Btrfs: add IO error device stats
Date: Fri, 25 May 2012 22:41:34 +0200	[thread overview]
Message-ID: <4FBFEE7E.8060008@gmx.net> (raw)
In-Reply-To: <4FBFC63B.6050403@giantdisaster.de>

On 05/25/12 19:49, Stefan Behrens wrote:
> It would be helpful if already the generic block layer would offer
> device error counters. Then btrfs could read them, add own counters for
> its checksum detected errors, and store everything persistently in the
> filesystem.
>

I take it that you not only count I/O-errors, but also corrupted blocks
and errors generated by misdirected writes. These are informations that
are not available to the block layer.


> The goal is to replace disks that have an increased error rate with
> spare disks, and the goal is to repair this degenerated RAID state quickly.
>
>
> On 05/25/2012 17:18, Christoph Hellwig wrote:
>> Can you explain why the device error counters should be in a filesystem
>> instead of generic block layer code?
>>
>> On Fri, May 25, 2012 at 04:06:07PM +0200, Stefan Behrens wrote:
> [...]
>>> 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.
>>>
>>> An ioctl interface is added to get the device statistic counters.
>>> A second ioctl is added to atomically get and reset these counters.
>>>
>>> The device statistics are written into the device tree with each
>>> transaction commit. Only modified statistics are written.
>>> When a filesystem is mounted, the device statistics for each involved
>>> device are read from the device tree and used to initialize the
>>> counters.
>>>
>>> A patch for the btrfs-progs world will also be sent.
>>>
>>> Stefan Behrens (3):
>>> Btrfs: add device counters for detected IO and checksum errors
>>> Btrfs: add ioctl to get and reset the device stats
>>> Btrfs: read device stats on mount, write modified ones during commit
>>>
>>> fs/btrfs/ctree.h | 38 ++++++
>>> fs/btrfs/disk-io.c | 20 +++-
>>> fs/btrfs/extent_io.c | 18 ++-
>>> fs/btrfs/ioctl.c | 26 +++++
>>> fs/btrfs/ioctl.h | 33 ++++++
>>> fs/btrfs/print-tree.c | 3 +
>>> fs/btrfs/scrub.c | 65 ++++++++---
>>> fs/btrfs/transaction.c | 4 +
>>> fs/btrfs/volumes.c | 304
>>> +++++++++++++++++++++++++++++++++++++++++++++++-
>>> fs/btrfs/volumes.h | 52 +++++++++
>>> 10 files changed, 539 insertions(+), 24 deletions(-)
>>>
>>> --
>>> 1.7.10.2
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html


      reply	other threads:[~2012-05-25 20:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 14:06 [PATCH v5 0/3] Btrfs: add IO error device stats Stefan Behrens
2012-05-25 14:06 ` [PATCH v5 1/3] Btrfs: add device counters for detected IO and checksum errors Stefan Behrens
2012-05-25 14:06 ` [PATCH v5 2/3] Btrfs: add ioctl to get and reset the device stats Stefan Behrens
2012-05-25 14:06 ` [PATCH v5 3/3] Btrfs: read device stats on mount, write modified ones during commit Stefan Behrens
2012-05-25 15:18 ` [PATCH v5 0/3] Btrfs: add IO error device stats Christoph Hellwig
2012-05-25 17:49   ` Stefan Behrens
2012-05-25 20:41     ` Arne Jansen [this message]

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=4FBFEE7E.8060008@gmx.net \
    --to=sensille@gmx.net \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sbehrens@giantdisaster.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;
as well as URLs for NNTP newsgroup(s).