mbox series

[0/8] Zone management commands support

Message ID 20191027140549.26272-1-damien.lemoal@wdc.com (mailing list archive)
Headers show
Series Zone management commands support | expand

Message

Damien Le Moal Oct. 27, 2019, 2:05 p.m. UTC
This series implements a few improvements and cleanups to zone block
device zone reset operations with the first three patches.

The remaining of the series patches introduce zone open, close and
finish support, allowing users of zoned block devices to explicitly
control the condition (state) of zones.

While these operations are not stricktly necessary for the correct
operation of zoned block devices, the open and close operations can
improve performance for some device implementations of the ZBC and ZAC
standards under write workloads. The finish zone operation, which
transition a zone to the full state, can also be useful to protect a
zone data by preventing further zone writes.

These operations are implemented by introducing the new
REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH request codes
and the function blkdev_zone_mgmt() to issue these requests. This new
function also replaces the former blkdev_reset_zones() function to reset
zones write pointer.

The new ioctls BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE are also
defined to allow applications to issue these new requests without
resorting to a device passthrough interface (e.g. SG_IO).

Support for these operations is added to the SCSI sd driver, to the dm
infrastructure (dm-linear and dm-flakey targets) and to the null_blk
driver.

Ajay Joshi (5):
  block: add zone open, close and finish operations
  block: add zone open, close and finish ioctl support
  scsi: sd_zbc: add zone open, close, and finish support
  dm: add zone open, close and finish support
  null_blk: add zone open, close, and finish support

Damien Le Moal (3):
  block: Remove REQ_OP_ZONE_RESET plugging
  block: Simplify REQ_OP_ZONE_RESET_ALL handling
  scsi: sd_zbc: Fix sd_zbc_complete()

 block/blk-core.c               | 12 +++--
 block/blk-zoned.c              | 99 ++++++++++++++++++----------------
 block/ioctl.c                  |  5 +-
 drivers/block/null_blk_zoned.c | 33 ++++++++++--
 drivers/md/dm-flakey.c         |  7 ++-
 drivers/md/dm-linear.c         |  2 +-
 drivers/md/dm-zoned-metadata.c |  6 +--
 drivers/md/dm.c                |  5 +-
 drivers/scsi/sd.c              | 15 +++++-
 drivers/scsi/sd.h              |  8 +--
 drivers/scsi/sd_zbc.c          | 43 +++++++--------
 fs/f2fs/segment.c              |  3 +-
 include/linux/blk_types.h      | 25 +++++++++
 include/linux/blkdev.h         | 15 +++---
 include/uapi/linux/blkzoned.h  | 17 ++++--
 15 files changed, 192 insertions(+), 103 deletions(-)

Comments

Jens Axboe Nov. 2, 2019, 3:01 a.m. UTC | #1
On 10/27/19 8:05 AM, Damien Le Moal wrote:
> This series implements a few improvements and cleanups to zone block
> device zone reset operations with the first three patches.
> 
> The remaining of the series patches introduce zone open, close and
> finish support, allowing users of zoned block devices to explicitly
> control the condition (state) of zones.
> 
> While these operations are not stricktly necessary for the correct
> operation of zoned block devices, the open and close operations can
> improve performance for some device implementations of the ZBC and ZAC
> standards under write workloads. The finish zone operation, which
> transition a zone to the full state, can also be useful to protect a
> zone data by preventing further zone writes.
> 
> These operations are implemented by introducing the new
> REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH request codes
> and the function blkdev_zone_mgmt() to issue these requests. This new
> function also replaces the former blkdev_reset_zones() function to reset
> zones write pointer.
> 
> The new ioctls BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE are also
> defined to allow applications to issue these new requests without
> resorting to a device passthrough interface (e.g. SG_IO).
> 
> Support for these operations is added to the SCSI sd driver, to the dm
> infrastructure (dm-linear and dm-flakey targets) and to the null_blk
> driver.

Can patch 3 go in separately, doesn't look like we need it in this
series?

Also need the DM folks to review/sign off on patch 7. Mike?
Damien Le Moal Nov. 3, 2019, 11:41 p.m. UTC | #2
On 2019/11/02 4:01, Jens Axboe wrote:
> On 10/27/19 8:05 AM, Damien Le Moal wrote:
>> This series implements a few improvements and cleanups to zone block
>> device zone reset operations with the first three patches.
>>
>> The remaining of the series patches introduce zone open, close and
>> finish support, allowing users of zoned block devices to explicitly
>> control the condition (state) of zones.
>>
>> While these operations are not stricktly necessary for the correct
>> operation of zoned block devices, the open and close operations can
>> improve performance for some device implementations of the ZBC and ZAC
>> standards under write workloads. The finish zone operation, which
>> transition a zone to the full state, can also be useful to protect a
>> zone data by preventing further zone writes.
>>
>> These operations are implemented by introducing the new
>> REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH request codes
>> and the function blkdev_zone_mgmt() to issue these requests. This new
>> function also replaces the former blkdev_reset_zones() function to reset
>> zones write pointer.
>>
>> The new ioctls BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE are also
>> defined to allow applications to issue these new requests without
>> resorting to a device passthrough interface (e.g. SG_IO).
>>
>> Support for these operations is added to the SCSI sd driver, to the dm
>> infrastructure (dm-linear and dm-flakey targets) and to the null_blk
>> driver.
> 
> Can patch 3 go in separately, doesn't look like we need it in this
> series?

Yes, I think it can go in now in 5.4-rc if Martin is willing to take it.
That will create a small conflict in your tree for patch 6 though.

Martin,

Can you take patch 3 now ?

> 
> Also need the DM folks to review/sign off on patch 7. Mike?
>
Martin K. Petersen Nov. 5, 2019, 4:51 a.m. UTC | #3
Damien,

> Can you take patch 3 now ?

Yep. Applied to 5.4/scsi-fixes.
Damien Le Moal Nov. 5, 2019, 5:08 a.m. UTC | #4
On 2019/11/05 13:53, Martin K. Petersen wrote:
> 
> Damien,
> 
>> Can you take patch 3 now ?
> 
> Yep. Applied to 5.4/scsi-fixes.

Thanks !
Jens Axboe Nov. 7, 2019, 1:40 p.m. UTC | #5
On 10/27/19 8:05 AM, Damien Le Moal wrote:
> This series implements a few improvements and cleanups to zone block
> device zone reset operations with the first three patches.
> 
> The remaining of the series patches introduce zone open, close and
> finish support, allowing users of zoned block devices to explicitly
> control the condition (state) of zones.
> 
> While these operations are not stricktly necessary for the correct
> operation of zoned block devices, the open and close operations can
> improve performance for some device implementations of the ZBC and ZAC
> standards under write workloads. The finish zone operation, which
> transition a zone to the full state, can also be useful to protect a
> zone data by preventing further zone writes.
> 
> These operations are implemented by introducing the new
> REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH request codes
> and the function blkdev_zone_mgmt() to issue these requests. This new
> function also replaces the former blkdev_reset_zones() function to reset
> zones write pointer.
> 
> The new ioctls BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE are also
> defined to allow applications to issue these new requests without
> resorting to a device passthrough interface (e.g. SG_IO).
> 
> Support for these operations is added to the SCSI sd driver, to the dm
> infrastructure (dm-linear and dm-flakey targets) and to the null_blk
> driver.

Applied for 5.5, thanks. I've got the last sd patch pending, the conflict
is rather ugly. I'll setup a post branch for drivers with this in, once
the dependent fix has landed in Linus's tree.