From: Mike Snitzer <snitzer@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: Heinz Mauelshagen <heinzm@redhat.com>,
device-mapper development <dm-devel@redhat.com>,
Shaohua Li <shli@kernel.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux RAID <linux-raid@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: dm-raid: add RAID discard support
Date: Thu, 2 Oct 2014 09:52:32 -0400 [thread overview]
Message-ID: <20141002135232.GA25298@redhat.com> (raw)
In-Reply-To: <20141002140410.1b379f74@notabene.brown>
On Thu, Oct 02 2014 at 12:04am -0400,
NeilBrown <neilb@suse.de> wrote:
>
> I plan to submit this to Linus tomorrow, hopefully for 3.7, unless there are
> complaints. It is in my for-next branch now.
>
> Thanks,
> NeilBrown
>
>
> From aec6f821ed92fac5ae4f1db50279a3999de5872a Mon Sep 17 00:00:00 2001
> From: NeilBrown <neilb@suse.de>
> Date: Thu, 2 Oct 2014 13:45:00 +1000
> Subject: [PATCH] md/raid5: disable 'DISCARD' by default due to safety
> concerns.
>
> It has come to my attention (thanks Martin) that 'discard_zeroes_data'
> is only a hint. Some devices in some cases don't do what it
> says on the label.
>
> The use of DISCARD in RAID5 depends on reads from discarded regions
> being predictably zero. If a write to a previously discarded region
> performs a read-modify-write cycle it assumes that the parity block
> was consistent with the data blocks. If all were zero, this would
> be the case. If some are and some aren't this would not be the case.
> This could lead to data corruption after a device failure when
> data needs to be reconstructed from the parity.
>
> As we cannot trust 'discard_zeroes_data', ignore it by default
> and so disallow DISCARD on all raid4/5/6 arrays.
>
> As many devices are trustworthy, and as there are benefits to using
> DISCARD, add a module parameter to over-ride this caution and cause
> DISCARD to work if discard_zeroes_data is set.
>
> If a site want to enable DISCARD on some arrays but not on others they
> should select DISCARD support at the filesystem level, and set the
> raid456 module parameter.
> raid456.devices_handle_discard_safely=Y
>
> As this is a data-safety issue, I believe this patch is suitable for
> -stable.
> DISCARD support for RAID456 was added in 3.7
>
> Cc: Shaohua Li <shli@kernel.org>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Cc: Heinz Mauelshagen <heinzm@redhat.com>
> Cc: stable@vger.kernel.org (3.7+)
> Fixes: 620125f2bf8ff0c4969b79653b54d7bcc9d40637
> Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Thanks Neil, I'll get something comparable staged for dm-raid for 3.18
(less urgency given that dm-raid doesn't yet support discards).
next prev parent reply other threads:[~2014-10-02 13:52 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 [this message]
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
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=20141002135232.GA25298@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=heinzm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=neilb@suse.de \
--cc=shli@kernel.org \
/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.