On Wed, Oct 26, 2016 at 05:46:11PM -0400, Mikulas Patocka wrote:
> I think the proper thing would be to move "discard_zeroes_data" flag into 
> the bio itself - there would be REQ_OP_DISCARD and REQ_OP_DISCARD_ZERO - 
> and if the device doesn't support REQ_OP_DISCARD_ZERO, it rejects the bio 
> and the caller is supposed to do zeroing manually.

Yes, Martin and I have come to a similar conclusion recently.  An
additional aspect is that NVMe has a Write Zeroes command which is more
limited than what REQ_OP_WRITE_SAME does.

So I think the right way is to add a REQ_OP_WRITE_ZEROES (or
REQ_OP_ZERO) and have modifies if it may discard or not.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to