[dm-devel] [PATCH] dm-raid: add RAID discard support
Christoph Hellwig
hch at infradead.org
Wed Sep 24 14:21:49 UTC 2014
On Tue, Sep 23, 2014 at 07:07:35PM -0400, Martin K. Petersen wrote:
> >>>>> "Heinz" == heinzm <heinzm at 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.
More information about the dm-devel
mailing list