Thread (49 messages) 49 messages, 9 authors, 2018-01-16

Re: [PATCH 25/27] block: remove the discard_zeroes_data flag

From: Nicholas A. Bellinger <hidden>
Date: 2017-05-11 04:50:35
Also in: dm-devel, linux-block, linux-scsi

On Wed, 2017-05-10 at 16:06 +0200, hch-jcswGhMUV9g@public.gmane.org wrote:
On Mon, May 08, 2017 at 11:46:14PM -0700, Nicholas A. Bellinger wrote:
quoted
That said, simply propagating up q->limits.max_write_zeroes_sectors as
dev_attrib->unmap_zeroes_data following existing code still looks like
the right thing to do.
It is not.  Martin has decoupled write same/zeroes support from discard
support.  Any device will claim to support it initially, and we'll
only clear the flag if a Write Same command fails.

So even if LBPRZ is not set you can trivially get into a situation
where discard is supported through UNMAP, and you'll incorrectly
set LBPRZ and will cause data corruption.
In that case, there are two choices.

1) Expose a block_device or request_queue bit to signal 'real LBPRZ'
support up to IBLOCK, in order to maintain SCSI target feature
compatibility.

2) Or drop the LBPRZ bit usage for IBLOCK all-together.

Since I happen happen to support a block driver that has 'real LBPRZ'
support for all discards, I'd prefer the latter so this doesn't have to
be carried out-of-tree.

So what are the options for this in post v4.12..?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help