mbox series

[v4,0/8] block: add zone write granularity limit

Message ID 20210128044733.503606-1-damien.lemoal@wdc.com (mailing list archive)
Headers show
Series block: add zone write granularity limit | expand

Message

Damien Le Moal Jan. 28, 2021, 4:47 a.m. UTC
The first patch of this series adds missing documentation of the
zone_append_max_bytes sysfs attribute.

The following 3 patches are cleanup and preparatory patches for the
introduction of the zone write granularity limit. The goal of these
patches is to have all code setting a device queue zoned model to use
the helper function blk_queue_set_zoned(). The nvme driver, null_blk
driver and the partition code are modified to do so.

The fourth patch in this series introduces the zone write granularity
queue limit to indicate the alignment constraint for write operations
into sequential zones of zoned block devices. This limit is always set
by default to the device logical block size. The following patch
documents this new limit.

The last 2 patches introduce the blk_queue_clear_zone_settings()
function and modify the SCSI sd driver to clear the zone related queue
limits and resources of a host-aware zoned disk that is changed to a
regular disk due to the presence of partitions.

Changes from v3:
* Added pathces 2, 3, 4, 7 and 8
* Addressed Christoph's comments on patch 5

Changes from v2:
* Added patch 3 for zonefs
* Addressed Christoph's comments on patch 1 and added the limit
  initialization for zoned nullblk

Changes from v1:
* Fixed typo in patch 2

Damien Le Moal (8):
  block: document zone_append_max_bytes attribute
  nvme: cleanup zone information initialization
  nullb: use blk_queue_set_zoned() to setup zoned devices
  block: use blk_queue_set_zoned in add_partition()
  block: introduce zone_write_granularity limit
  zonefs: use zone write granularity as block size
  block: introduce blk_queue_clear_zone_settings()
  sd_zbc: clear zone resources for non-zoned case

Damien Le Moal (8):
  block: document zone_append_max_bytes attribute
  nvme: cleanup zone information initialization
  nullb: use blk_queue_set_zoned() to setup zoned devices
  block: use blk_queue_set_zoned in add_partition()
  block: introduce zone_write_granularity limit
  zonefs: use zone write granularity as block size
  block: introduce blk_queue_clear_zone_settings()
  sd_zbc: clear zone resources for non-zoned case

 Documentation/block/queue-sysfs.rst | 13 +++++++++
 block/blk-settings.c                | 39 +++++++++++++++++++++++++-
 block/blk-sysfs.c                   |  8 ++++++
 block/blk-zoned.c                   | 17 ++++++++++++
 block/blk.h                         |  2 ++
 block/partitions/core.c             |  2 +-
 drivers/block/null_blk/zoned.c      |  8 +++---
 drivers/nvme/host/core.c            | 11 ++++----
 drivers/nvme/host/zns.c             | 11 ++------
 drivers/scsi/sd_zbc.c               | 43 ++++++++++++++++++++++++++---
 fs/zonefs/super.c                   |  9 +++---
 include/linux/blkdev.h              | 15 ++++++++++
 12 files changed, 150 insertions(+), 28 deletions(-)

Comments

Damien Le Moal Feb. 4, 2021, 8:47 a.m. UTC | #1
On 2021/01/28 13:50, Damien Le Moal wrote:
> The first patch of this series adds missing documentation of the
> zone_append_max_bytes sysfs attribute.
> 
> The following 3 patches are cleanup and preparatory patches for the
> introduction of the zone write granularity limit. The goal of these
> patches is to have all code setting a device queue zoned model to use
> the helper function blk_queue_set_zoned(). The nvme driver, null_blk
> driver and the partition code are modified to do so.
> 
> The fourth patch in this series introduces the zone write granularity
> queue limit to indicate the alignment constraint for write operations
> into sequential zones of zoned block devices. This limit is always set
> by default to the device logical block size. The following patch
> documents this new limit.
> 
> The last 2 patches introduce the blk_queue_clear_zone_settings()
> function and modify the SCSI sd driver to clear the zone related queue
> limits and resources of a host-aware zoned disk that is changed to a
> regular disk due to the presence of partitions.

Hi Jens,

Any comment on this series ?

Martin,

The scsi bits (patch 5 and 8) may need your ack.

Thanks !

> 
> Changes from v3:
> * Added pathces 2, 3, 4, 7 and 8
> * Addressed Christoph's comments on patch 5
> 
> Changes from v2:
> * Added patch 3 for zonefs
> * Addressed Christoph's comments on patch 1 and added the limit
>   initialization for zoned nullblk
> 
> Changes from v1:
> * Fixed typo in patch 2
> 
> Damien Le Moal (8):
>   block: document zone_append_max_bytes attribute
>   nvme: cleanup zone information initialization
>   nullb: use blk_queue_set_zoned() to setup zoned devices
>   block: use blk_queue_set_zoned in add_partition()
>   block: introduce zone_write_granularity limit
>   zonefs: use zone write granularity as block size
>   block: introduce blk_queue_clear_zone_settings()
>   sd_zbc: clear zone resources for non-zoned case
> 
> Damien Le Moal (8):
>   block: document zone_append_max_bytes attribute
>   nvme: cleanup zone information initialization
>   nullb: use blk_queue_set_zoned() to setup zoned devices
>   block: use blk_queue_set_zoned in add_partition()
>   block: introduce zone_write_granularity limit
>   zonefs: use zone write granularity as block size
>   block: introduce blk_queue_clear_zone_settings()
>   sd_zbc: clear zone resources for non-zoned case
> 
>  Documentation/block/queue-sysfs.rst | 13 +++++++++
>  block/blk-settings.c                | 39 +++++++++++++++++++++++++-
>  block/blk-sysfs.c                   |  8 ++++++
>  block/blk-zoned.c                   | 17 ++++++++++++
>  block/blk.h                         |  2 ++
>  block/partitions/core.c             |  2 +-
>  drivers/block/null_blk/zoned.c      |  8 +++---
>  drivers/nvme/host/core.c            | 11 ++++----
>  drivers/nvme/host/zns.c             | 11 ++------
>  drivers/scsi/sd_zbc.c               | 43 ++++++++++++++++++++++++++---
>  fs/zonefs/super.c                   |  9 +++---
>  include/linux/blkdev.h              | 15 ++++++++++
>  12 files changed, 150 insertions(+), 28 deletions(-)
>
Christoph Hellwig Feb. 8, 2021, 5:17 p.m. UTC | #2
On Thu, Feb 04, 2021 at 08:47:51AM +0000, Damien Le Moal wrote:
> Any comment on this series ?
> 
> Martin,
> 
> The scsi bits (patch 5 and 8) may need your ack.

ping?  Jens, having this series really helps with some of the
ongoing zoned device work.
Jens Axboe Feb. 10, 2021, 2:45 p.m. UTC | #3
On 1/27/21 9:47 PM, Damien Le Moal wrote:
> The first patch of this series adds missing documentation of the
> zone_append_max_bytes sysfs attribute.
> 
> The following 3 patches are cleanup and preparatory patches for the
> introduction of the zone write granularity limit. The goal of these
> patches is to have all code setting a device queue zoned model to use
> the helper function blk_queue_set_zoned(). The nvme driver, null_blk
> driver and the partition code are modified to do so.
> 
> The fourth patch in this series introduces the zone write granularity
> queue limit to indicate the alignment constraint for write operations
> into sequential zones of zoned block devices. This limit is always set
> by default to the device logical block size. The following patch
> documents this new limit.
> 
> The last 2 patches introduce the blk_queue_clear_zone_settings()
> function and modify the SCSI sd driver to clear the zone related queue
> limits and resources of a host-aware zoned disk that is changed to a
> regular disk due to the presence of partitions.

Applied, thanks.