Re: REQ_OP for zeroing, was Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[adding Chaitanya to Cc]

On Fri, Oct 28, 2016 at 07:43:41AM -0400, Mikulas Patocka wrote:
> We could detect if the REQ_OP_WRITE_SAME command contains all zeroes and 
> if it does, turn it into "Write Zeroes" or TRIM command (if the device 
> guarantees zeroing on trim). If it doesn't contain all zeroes and the 
> device doesn't support non-zero WRITE SAME, then reject it.

I don't like this because it's very inefficient - we have to allocate
a payload first and then compare the whole payload for very operation.

> Or maybe we could add a new command REQ_OP_WRITE_ZEROES - I'm not sure 
> which of these two possibilities is better.

Chaitanya actually did an initial prototype implementation of this for
NVMe that he shared with me.  I liked it a lot and I think he'll be
ready to post it in a few days.  Now that we have the REQ_OP* values
instead of mapping different command types to flags it's actually
surprisingly easy to add new block layer operations.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux