Commit 69f637c3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-5.11/drivers-2020-12-14' of git://git.kernel.dk/linux-block

Pull block driver updates from Jens Axboe:
 "Nothing major in here:

   - NVMe pull request from Christoph:
        - nvmet passthrough improvements (Chaitanya Kulkarni)
        - fcloop error injection support (James Smart)
        - read-only support for zoned namespaces without Zone Append
          (Javier González)
        - improve some error message (Minwoo Im)
        - reject I/O to offline fabrics namespaces (Victor Gladkov)
        - PCI queue allocation cleanups (Niklas Schnelle)
        - remove an unused allocation in nvmet (Amit Engel)
        - a Kconfig spelling fix (Colin Ian King)
        - nvme_req_qid simplication (Baolin Wang)

   - MD pull request from Song:
        - Fix race condition in md_ioctl() (Dae R. Jeong)
        - Initialize read_slot properly for raid10 (Kevin Vigor)
        - Code cleanup (Pankaj Gupta)
        - md-cluster resync/reshape fix (Zhao Heming)

   - Move null_blk into its own directory (Damien Le Moal)

   - null_blk zone and discard improvements (Damien Le Moal)

   - bcache race fix (Dongsheng Yang)

   - Set of rnbd fixes/improvements (Gioh Kim, Guoqing Jiang, Jack Wang,
     Lutz Pogrell, Md Haris Iqbal)

   - lightnvm NULL pointer deref fix (tangzhenhao)

   - sr in_interrupt() removal (Sebastian Andrzej Siewior)

   - FC endpoint security support for s390/dasd (Jan Höppner, Sebastian
     Ott, Vineeth Vijayan). From the s390 arch guys, arch bits included
     as it made it easier for them to funnel the feature through the
     block driver tree.

   - Follow up fixes (Colin Ian King)"

* tag 'for-5.11/drivers-2020-12-14' of git://git.kernel.dk/linux-block: (64 commits)
  block: drop dead assignments in loop_init()
  sr: Remove in_interrupt() usage in sr_init_command().
  sr: Switch the sector size back to 2048 if sr_read_sector() changed it.
  cdrom: Reset sector_size back it is not 2048.
  drivers/lightnvm: fix a null-ptr-deref bug in pblk-core.c
  null_blk: Move driver into its own directory
  null_blk: Allow controlling max_hw_sectors limit
  null_blk: discard zones on reset
  null_blk: cleanup discard handling
  null_blk: Improve implicit zone close
  null_blk: improve zone locking
  block: Align max_hw_sectors to logical blocksize
  null_blk: Fail zone append to conventional zones
  null_blk: Fix zone size initialization
  bcache: fix race between setting bdev state to none and new write request direct to backing
  block/rnbd: fix a null pointer dereference on dev->blk_symlink_name
  block/rnbd-clt: Dynamically alloc buffer for pathname & blk_symlink_name
  block/rnbd: call kobject_put in the failure path
  Documentation/ABI/rnbd-srv: add document for force_close
  block/rnbd-srv: close a mapped device from server side.
  ...
parents ac7ac461 aeb2b0b1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ Description: Expected format is the following::
		    The rnbd_server prepends the <device_path> received from client
		    with <dev_search_path> and tries to open the
		    <dev_search_path>/<device_path> block device.  On success,
		    a /dev/rnbd<N> device file, a /sys/block/rnbd_client/rnbd<N>/
		    a /dev/rnbd<N> device file, a /sys/block/rnbd<N>/
		    directory and an entry in /sys/class/rnbd-client/ctl/devices
		    will be created.

@@ -95,12 +95,12 @@ Description: Expected format is the following::
		---------------------------------

		After mapping, the device file can be found by:
		o  The symlink /sys/class/rnbd-client/ctl/devices/<device_id>
		o  The symlink /sys/class/rnbd-client/ctl/devices/<device_id>@<session_name>
		points to /sys/block/<dev-name>. The last part of the symlink destination
		is the same as the device name.  By extracting the last part of the
		path the path to the device /dev/<dev-name> can be build.

		* /dev/block/$(cat /sys/class/rnbd-client/ctl/devices/<device_id>/dev)
		* /dev/block/$(cat /sys/class/rnbd-client/ctl/devices/<device_id>@<session_name>/dev)

		How to find the <device_id> of the device is described on the next
		section.
@@ -110,7 +110,7 @@ Date: Feb 2020
KernelVersion:	5.7
Contact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
Description:	For each device mapped on the client a new symbolic link is created as
		/sys/class/rnbd-client/ctl/devices/<device_id>, which points
		/sys/class/rnbd-client/ctl/devices/<device_id>@<session_name>, which points
		to the block device created by rnbd (/sys/block/rnbd<N>/).
		The <device_id> of each device is created as follows:

+8 −0
Original line number Diff line number Diff line
@@ -48,3 +48,11 @@ Date: Feb 2020
KernelVersion:	5.7
Contact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
Description:	Contains the device access mode: ro, rw or migration.

What:		/sys/class/rnbd-server/ctl/devices/<device_name>/sessions/<session-name>/force_close
Date:		Nov 2020
KernelVersion:	5.10
Contact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
Description:	Write "1" to the file to close the device on server side. Please
		note that the client side device will not be closed, read or
		write to the device will get -ENOTCONN.
+2 −0
Original line number Diff line number Diff line
@@ -104,6 +104,8 @@ struct ccw_device {
					       was successfully verified. */
#define PE_PATHGROUP_ESTABLISHED	0x4 /* A pathgroup was reset and had
					       to be established again. */
#define PE_PATH_FCES_EVENT		0x8 /* The FCES Status of a path has
					     * changed. */

/*
 * Possible CIO actions triggered by the unit check handler.
+1 −0
Original line number Diff line number Diff line
@@ -373,5 +373,6 @@ int chsc_sstpc(void *page, unsigned int op, u16 ctrl, u64 *clock_delta);
int chsc_sstpi(void *page, void *result, size_t size);
int chsc_stzi(void *page, void *result, size_t size);
int chsc_sgib(u32 origin);
int chsc_scud(u16 cu, u64 *esm, u8 *esm_valid);

#endif
+18 −5
Original line number Diff line number Diff line
@@ -157,10 +157,16 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto
		       __func__, max_hw_sectors);
	}

	max_hw_sectors = round_down(max_hw_sectors,
				    limits->logical_block_size >> SECTOR_SHIFT);
	limits->max_hw_sectors = max_hw_sectors;

	max_sectors = min_not_zero(max_hw_sectors, limits->max_dev_sectors);
	max_sectors = min_t(unsigned int, max_sectors, BLK_DEF_MAX_SECTORS);
	max_sectors = round_down(max_sectors,
				 limits->logical_block_size >> SECTOR_SHIFT);
	limits->max_sectors = max_sectors;

	q->backing_dev_info->io_pages = max_sectors >> (PAGE_SHIFT - 9);
}
EXPORT_SYMBOL(blk_queue_max_hw_sectors);
@@ -321,13 +327,20 @@ EXPORT_SYMBOL(blk_queue_max_segment_size);
 **/
void blk_queue_logical_block_size(struct request_queue *q, unsigned int size)
{
	q->limits.logical_block_size = size;
	struct queue_limits *limits = &q->limits;

	if (q->limits.physical_block_size < size)
		q->limits.physical_block_size = size;
	limits->logical_block_size = size;

	if (q->limits.io_min < q->limits.physical_block_size)
		q->limits.io_min = q->limits.physical_block_size;
	if (limits->physical_block_size < size)
		limits->physical_block_size = size;

	if (limits->io_min < limits->physical_block_size)
		limits->io_min = limits->physical_block_size;

	limits->max_hw_sectors =
		round_down(limits->max_hw_sectors, size >> SECTOR_SHIFT);
	limits->max_sectors =
		round_down(limits->max_sectors, size >> SECTOR_SHIFT);
}
EXPORT_SYMBOL(blk_queue_logical_block_size);

Loading