mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Alberto Bertogli <albertito@blitiri.com.ar>
Cc: SandeepKsinha <sandeepksinha@gmail.com>,
	Goswin von Brederlow <goswin-v-b@web.de>,
	linux-kernel@vger.kernel.org, dm-devel@redhat.com,
	linux-raid@vger.kernel.org, agk@redhat.com, neilb@suse.de
Subject: Re: [RFC PATCH] dm-csum: A new device mapper target that checks data integrity
Date: Fri, 26 Jun 2009 23:53:57 +0100	[thread overview]
Message-ID: <20090626235357.7bec63a8@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20090626223634.GG5913@blitiri.com.ar>

> If it returns success but writes the wrong data to the disk, then there will
> be a mismatch between the checksum and the data at the destination, which will
> be detected when it is read.

(or to the wrong place on the disk which for pre SATA is actually
possibly more likely as the command transfers are not CRC protected on
the cable - just slower, while the data is CRC protected). SATA fixes
this.

> If a write returns success but no write ever takes place on the disk, then
> dm-csum (as it is now) will not detect it; although I'm not sure if that
> qualifies as on-disk data corruption or is it a disk controller issue.

Does it matter to the poor victim ? At this point you get into putting
mirrors on disks A & B with their integrity on the opposite pair so if
one forgets to do I/O hopefully both won't.

To be honest if you are really really paranoid you don't do link layer
checksumming anyway (which is what this is) you checksum in the apps using
the data set. That protects you against lots of error cases in the
memory/cache system and on network transmissions. On big clusters
crunching enormous amounts of data all those 1 in 10^lots bit error rates
become such that it's worth the effort.

> It's per IMD sector. More specifically, struct imd_sector_header's
> last_updated contains the generation count for the entire IMD sector, which is
> used to determine which one is younger for updating purposes.
> 
> On reads, both IMD sectors are loaded and CRCs are verified against both.

Seems reasonably paranoid - drives will do things under you like commit
data to disk out in a different order to the commands unless the cache
gets flushed between them but the barrier code should do that bit.

Alan

  reply	other threads:[~2009-06-26 22:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 16:13 Alberto Bertogli
2009-05-21 18:17 ` Greg Freemyer
2009-05-21 19:17   ` Alberto Bertogli
2009-05-25 12:22 ` Goswin von Brederlow
2009-05-25 17:46   ` Alberto Bertogli
2009-05-26 10:33     ` Goswin von Brederlow
2009-05-26 12:52       ` Alberto Bertogli
2009-05-28 19:29         ` Goswin von Brederlow
2009-06-26  7:26           ` SandeepKsinha
2009-06-26  8:50             ` SandeepKsinha
2009-06-26 22:36             ` Alberto Bertogli
2009-06-26 22:53               ` Alan Cox [this message]
2009-06-28  0:34         ` Neil Brown
2009-06-28 15:30           ` Alberto Bertogli
2009-06-28 22:59             ` Goswin von Brederlow
2009-05-26 19:48 ` [RFC PATCH v2] " Alberto Bertogli

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=20090626235357.7bec63a8@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=agk@redhat.com \
    --cc=albertito@blitiri.com.ar \
    --cc=dm-devel@redhat.com \
    --cc=goswin-v-b@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=sandeepksinha@gmail.com \
    /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

all inboxes | Powered by JetHome®