All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinz Mauelshagen <heinzm@redhat.com>
To: Christoph Hellwig <hch@infradead.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH] dm-raid: add RAID discard support
Date: Wed, 24 Sep 2014 16:38:02 +0200	[thread overview]
Message-ID: <5422D74A.6020502@redhat.com> (raw)
In-Reply-To: <20140924142149.GA3858@infradead.org>


On 09/24/2014 04:21 PM, Christoph Hellwig wrote:
> On Tue, Sep 23, 2014 at 07:07:35PM -0400, Martin K. Petersen wrote:
>>>>>>> "Heinz" == heinzm  <heinzm@redhat.com> writes:
>> Heinz> In case of RAID levels 4,5 and 6 we have to check for the
>> Heinz> capability to zero data on discards to avoid stripe data
>> Heinz> corruption.
>>
>> I'm quite concerned about relying on discard_zeroes_data since it's a
>> hint and not a hard guarantee.
> If we want to provide useful discards through raid we need to make
> it a hard guarantee.  That is:
>
>   - only set it when using a WRITE SAME variant on scsi
>   - start adding a whitelist for ATA
>
> Relying on zeroout which also works when it doesn't unmap below is not
> the answer, especially if it may end up doing a physical write of zeroes
> on disk devices.  Alternatively we could get rid of discard_zeroes_data
> and stop the pretence of any sane behavior from discard, and instead
> expose an unmap bit through the blkdev_issue_zeroout stack for those
> callers who want to do a discard, but rely on zeroes.  The end effect
> will be the same, just a different presentation.

Neil already came up with an unmap  bitmap  to add to the RAID4/5/6
personalities in order to harden MD in this regard.
In order to avoid any related data corruption with any future disk types
it seems to be the approprite solution.

Waiting for him to comment more on this.

Heinz

  reply	other threads:[~2014-09-24 14:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 16:51 [PATCH] dm-raid: add RAID discard support heinzm
2014-09-23 21:52 ` Brassow Jonathan
2014-09-23 23:07 ` Martin K. Petersen
2014-09-23 23:33   ` NeilBrown
2014-09-24  2:20     ` Martin K. Petersen
2014-09-24  4:05       ` Brassow Jonathan
2014-09-24  4:21         ` NeilBrown
2014-09-24  4:35           ` Brassow Jonathan
2014-09-24 11:02           ` Heinz Mauelshagen
2014-10-01  2:56             ` NeilBrown
2014-10-01 11:13               ` Heinz Mauelshagen
2014-10-03  1:12                 ` Martin K. Petersen
2014-10-01 13:32               ` Mike Snitzer
2014-10-01 23:34                 ` NeilBrown
2014-10-02  1:31                   ` Mike Snitzer
2014-10-02  2:00                     ` NeilBrown
2014-10-02  4:04                       ` [dm-devel] " NeilBrown
2014-10-02 13:52                         ` Mike Snitzer
2014-10-02 18:00                           ` Mike Snitzer
2014-10-03  1:14                         ` [dm-devel] " Martin K. Petersen
2014-10-01 16:00               ` [PATCH] " Andrey Kuzmin
2014-10-01 23:15                 ` NeilBrown
2014-10-01 18:57               ` Brassow Jonathan
2014-10-01 23:18                 ` NeilBrown
2014-10-03  1:09               ` Martin K. Petersen
2014-09-24 14:21   ` Christoph Hellwig
2014-09-24 14:38     ` Heinz Mauelshagen [this message]
2014-09-24 15:11     ` Martin K. Petersen

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=5422D74A.6020502@redhat.com \
    --to=heinzm@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.