Commit 4f43d648 authored by Jens Axboe's avatar Jens Axboe
Browse files

Merge branch 'for-5.9/drivers' into for-5.9/block-merge

* for-5.9/drivers: (38 commits)
  block: add max_active_zones to blk-sysfs
  block: add max_open_zones to blk-sysfs
  s390/dasd: Use struct_size() helper
  s390/dasd: fix inability to use DASD with DIAG driver
  md-cluster: fix wild pointer of unlock_all_bitmaps()
  md/raid5-cache: clear MD_SB_CHANGE_PENDING before flushing stripes
  md: fix deadlock causing by sysfs_notify
  md: improve io stats accounting
  md: raid0/linear: fix dereference before null check on pointer mddev
  rsxx: switch from 'pci_free_consistent()' to 'dma_free_coherent()'
  nvme: remove ns->disk checks
  nvme-pci: use standard block status symbolic names
  nvme-pci: use the consistent return type of nvme_pci_iod_alloc_size()
  nvme-pci: add a blank line after declarations
  nvme-pci: fix some comments issues
  nvme-pci: remove redundant segment validation
  nvme: document quirked Intel models
  nvme: expose reconnect_delay and ctrl_loss_tmo via sysfs
  nvme: support for zoned namespaces
  nvme: support for multiple Command Sets Supported and Effects log pages
  ...
parents 9caaa66c 659bf827
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -273,6 +273,24 @@ Description:
		device ("host-aware" or "host-managed" zone model). For regular
		block devices, the value is always 0.

What:		/sys/block/<disk>/queue/max_active_zones
Date:		July 2020
Contact:	Niklas Cassel <niklas.cassel@wdc.com>
Description:
		For zoned block devices (zoned attribute indicating
		"host-managed" or "host-aware"), the sum of zones belonging to
		any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED,
		is limited by this value. If this value is 0, there is no limit.

What:		/sys/block/<disk>/queue/max_open_zones
Date:		July 2020
Contact:	Niklas Cassel <niklas.cassel@wdc.com>
Description:
		For zoned block devices (zoned attribute indicating
		"host-managed" or "host-aware"), the sum of zones belonging to
		any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN,
		is limited by this value. If this value is 0, there is no limit.

What:		/sys/block/<disk>/queue/chunk_sectors
Date:		September 2016
Contact:	Hannes Reinecke <hare@suse.com>
+14 −0
Original line number Diff line number Diff line
@@ -117,6 +117,20 @@ Maximum number of elements in a DMA scatter/gather list with integrity
data that will be submitted by the block layer core to the associated
block driver.

max_active_zones (RO)
---------------------
For zoned block devices (zoned attribute indicating "host-managed" or
"host-aware"), the sum of zones belonging to any of the zone states:
EXPLICIT OPEN, IMPLICIT OPEN or CLOSED, is limited by this value.
If this value is 0, there is no limit.

max_open_zones (RO)
-------------------
For zoned block devices (zoned attribute indicating "host-managed" or
"host-aware"), the sum of zones belonging to any of the zone states:
EXPLICIT OPEN or IMPLICIT OPEN, is limited by this value.
If this value is 0, there is no limit.

max_sectors_kb (RW)
-------------------
This is the maximum number of kilobytes that the block layer will allow
+3 −2
Original line number Diff line number Diff line
@@ -86,9 +86,10 @@ config BLK_DEV_ZONED
	select MQ_IOSCHED_DEADLINE
	help
	Block layer zoned block device support. This option enables
	support for ZAC/ZBC host-managed and host-aware zoned block devices.
	support for ZAC/ZBC/ZNS host-managed and host-aware zoned block
	devices.

	Say yes here if you have a ZAC or ZBC storage device.
	Say yes here if you have a ZAC, ZBC, or ZNS storage device.

config BLK_DEV_THROTTLING
	bool "Block layer bio throttling support"
+27 −0
Original line number Diff line number Diff line
@@ -306,6 +306,16 @@ static ssize_t queue_nr_zones_show(struct request_queue *q, char *page)
	return queue_var_show(blk_queue_nr_zones(q), page);
}

static ssize_t queue_max_open_zones_show(struct request_queue *q, char *page)
{
	return queue_var_show(queue_max_open_zones(q), page);
}

static ssize_t queue_max_active_zones_show(struct request_queue *q, char *page)
{
	return queue_var_show(queue_max_active_zones(q), page);
}

static ssize_t queue_nomerges_show(struct request_queue *q, char *page)
{
	return queue_var_show((blk_queue_nomerges(q) << 1) |
@@ -668,6 +678,16 @@ static struct queue_sysfs_entry queue_nr_zones_entry = {
	.show = queue_nr_zones_show,
};

static struct queue_sysfs_entry queue_max_open_zones_entry = {
	.attr = {.name = "max_open_zones", .mode = 0444 },
	.show = queue_max_open_zones_show,
};

static struct queue_sysfs_entry queue_max_active_zones_entry = {
	.attr = {.name = "max_active_zones", .mode = 0444 },
	.show = queue_max_active_zones_show,
};

static struct queue_sysfs_entry queue_nomerges_entry = {
	.attr = {.name = "nomerges", .mode = 0644 },
	.show = queue_nomerges_show,
@@ -766,6 +786,8 @@ static struct attribute *queue_attrs[] = {
	&queue_nonrot_entry.attr,
	&queue_zoned_entry.attr,
	&queue_nr_zones_entry.attr,
	&queue_max_open_zones_entry.attr,
	&queue_max_active_zones_entry.attr,
	&queue_nomerges_entry.attr,
	&queue_rq_affinity_entry.attr,
	&queue_iostats_entry.attr,
@@ -793,6 +815,11 @@ static umode_t queue_attr_visible(struct kobject *kobj, struct attribute *attr,
		(!q->mq_ops || !q->mq_ops->timeout))
			return 0;

	if ((attr == &queue_max_open_zones_entry.attr ||
	     attr == &queue_max_active_zones_entry.attr) &&
	    !blk_queue_is_zoned(q))
		return 0;

	return attr->mode;
}

+1 −0
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
		return ret;

	rep.nr_zones = ret;
	rep.flags = BLK_ZONE_REP_CAPACITY;
	if (copy_to_user(argp, &rep, sizeof(struct blk_zone_report)))
		return -EFAULT;
	return 0;
Loading