Re: [PATCH v3 08/10] null_blk: Support REQ_OP_ZONE_APPEND
From: Damien Le Moal <hidden>
Date: 2020-03-28 08:51:37
Also in:
linux-fsdevel, linux-scsi
On 2020/03/28 2:26, Christoph Hellwig wrote:
On Sat, Mar 28, 2020 at 01:50:10AM +0900, Johannes Thumshirn wrote:quoted
From: Damien Le Moal <redacted> Support REQ_OP_ZONE_APPEND requests for zone mode null_blk devices. Use the internally tracked zone write pointer position as the actual write position, which is returned using the command request __sector field in the case of an mq device and using the command BIO sector in the case of a BIO device. Since the write position is used for data copy in the case of a memory backed device, reverse the order in which null_handle_zoned() and null_handle_memory_backed() are called to ensure that null_handle_memory_backed() sees the correct write position for REQ_OP_ZONE_APPEND operations.I think moving null_zone_write earlier actually is a bug-fixd as is as we should not touch memory if the zone condition or write pointer isn't valid for a write. I'd suggest splitting that out as a bug fix and move it to the start of the series so that Jens can pick it up ASAP.
OK. Will do that. Johannes, If you agree, I will send a patch separately for the move of null_handle_zoned() before the memcopy. While at it, I think I could also take patch 7 from this series and send it together with the reset all cleanup using req flag. That will make a mini series for cleaning & fixing null blk.
Otherwise this looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
-- Damien Le Moal Western Digital Research