Commit 8467b0ed authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-5.18/drivers-2022-04-01' of git://git.kernel.dk/linux-block

Pull block driver fixes from Jens Axboe:
 "Followup block driver updates and fixes for the 5.18-rc1 merge window.
  In detail:

   - NVMe pull request
       - Fix multipath hang when disk goes live over reconnect (Anton
         Eidelman)
       - fix RCU hole that allowed for endless looping in multipath
         round robin (Chris Leech)
       - remove redundant assignment after left shift (Colin Ian King)
       - add quirks for Samsung X5 SSDs (Monish Kumar R)
       - fix the read-only state for zoned namespaces with unsupposed
         features (Pankaj Raghav)
       - use a private workqueue instead of the system workqueue in
         nvmet (Sagi Grimberg)
       - allow duplicate NSIDs for private namespaces (Sungup Moon)
       - expose use_threaded_interrupts read-only in sysfs (Xin Hao)"

   - nbd minor allocation fix (Zhang)

   - drbd fixes and maintainer addition (Lars, Jakob, Christoph)

   - n64cart build fix (Jackie)

   - loop compat ioctl fix (Carlos)

   - misc fixes (Colin, Dongli)"

* tag 'for-5.18/drivers-2022-04-01' of git://git.kernel.dk/linux-block:
  drbd: remove check of list iterator against head past the loop body
  drbd: remove usage of list iterator variable after loop
  nbd: fix possible overflow on 'first_minor' in nbd_dev_add()
  MAINTAINERS: add drbd co-maintainer
  drbd: fix potential silent data corruption
  loop: fix ioctl calls using compat_loop_info
  nvme-multipath: fix hang when disk goes live over reconnect
  nvme: fix RCU hole that allowed for endless looping in multipath round robin
  nvme: allow duplicate NSIDs for private namespaces
  nvmet: remove redundant assignment after left shift
  nvmet: use a private workqueue instead of the system workqueue
  nvme-pci: add quirks for Samsung X5 SSDs
  nvme-pci: expose use_threaded_interrupts read-only in sysfs
  nvme: fix the read-only state for zoned namespaces with unsupposed features
  n64cart: convert bi_disk to bi_bdev->bd_disk fix build
  xen/blkfront: fix comment for need_copy
  xen-blkback: remove redundant assignment to variable i
parents d589ae0d 2651ee5a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6052,6 +6052,7 @@ F: drivers/scsi/dpt/
DRBD DRIVER
M:	Philipp Reisner <philipp.reisner@linbit.com>
M:	Lars Ellenberg <lars.ellenberg@linbit.com>
M:	Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
L:	drbd-dev@lists.linbit.com
S:	Supported
W:	http://www.drbd.org
+5 −2
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ void tl_release(struct drbd_connection *connection, unsigned int barrier_nr,
		unsigned int set_size)
{
	struct drbd_request *r;
	struct drbd_request *req = NULL;
	struct drbd_request *req = NULL, *tmp = NULL;
	int expect_epoch = 0;
	int expect_size = 0;

@@ -225,8 +225,11 @@ void tl_release(struct drbd_connection *connection, unsigned int barrier_nr,
	 * to catch requests being barrier-acked "unexpectedly".
	 * It usually should find the same req again, or some READ preceding it. */
	list_for_each_entry(req, &connection->transfer_log, tl_requests)
		if (req->epoch == expect_epoch)
		if (req->epoch == expect_epoch) {
			tmp = req;
			break;
		}
	req = list_prepare_entry(tmp, &connection->transfer_log, tl_requests);
	list_for_each_entry_safe_from(req, r, &connection->transfer_log, tl_requests) {
		if (req->epoch != expect_epoch)
			break;
+29 −16
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ void start_new_tl_epoch(struct drbd_connection *connection)
void complete_master_bio(struct drbd_device *device,
		struct bio_and_error *m)
{
	if (unlikely(m->error))
		m->bio->bi_status = errno_to_blk_status(m->error);
	bio_endio(m->bio);
	dec_ap_bio(device);
@@ -332,17 +333,21 @@ static void set_if_null_req_next(struct drbd_peer_device *peer_device, struct dr
static void advance_conn_req_next(struct drbd_peer_device *peer_device, struct drbd_request *req)
{
	struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
	struct drbd_request *iter = req;
	if (!connection)
		return;
	if (connection->req_next != req)
		return;
	list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) {
		const unsigned s = req->rq_state;
		if (s & RQ_NET_QUEUED)

	req = NULL;
	list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) {
		const unsigned int s = iter->rq_state;

		if (s & RQ_NET_QUEUED) {
			req = iter;
			break;
		}
	if (&req->tl_requests == &connection->transfer_log)
		req = NULL;
	}
	connection->req_next = req;
}

@@ -358,17 +363,21 @@ static void set_if_null_req_ack_pending(struct drbd_peer_device *peer_device, st
static void advance_conn_req_ack_pending(struct drbd_peer_device *peer_device, struct drbd_request *req)
{
	struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
	struct drbd_request *iter = req;
	if (!connection)
		return;
	if (connection->req_ack_pending != req)
		return;
	list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) {
		const unsigned s = req->rq_state;
		if ((s & RQ_NET_SENT) && (s & RQ_NET_PENDING))

	req = NULL;
	list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) {
		const unsigned int s = iter->rq_state;

		if ((s & RQ_NET_SENT) && (s & RQ_NET_PENDING)) {
			req = iter;
			break;
		}
	if (&req->tl_requests == &connection->transfer_log)
		req = NULL;
	}
	connection->req_ack_pending = req;
}

@@ -384,17 +393,21 @@ static void set_if_null_req_not_net_done(struct drbd_peer_device *peer_device, s
static void advance_conn_req_not_net_done(struct drbd_peer_device *peer_device, struct drbd_request *req)
{
	struct drbd_connection *connection = peer_device ? peer_device->connection : NULL;
	struct drbd_request *iter = req;
	if (!connection)
		return;
	if (connection->req_not_net_done != req)
		return;
	list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) {
		const unsigned s = req->rq_state;
		if ((s & RQ_NET_SENT) && !(s & RQ_NET_DONE))

	req = NULL;
	list_for_each_entry_continue(iter, &connection->transfer_log, tl_requests) {
		const unsigned int s = iter->rq_state;

		if ((s & RQ_NET_SENT) && !(s & RQ_NET_DONE)) {
			req = iter;
			break;
		}
	if (&req->tl_requests == &connection->transfer_log)
		req = NULL;
	}
	connection->req_not_net_done = req;
}

+1 −0
Original line number Diff line number Diff line
@@ -1591,6 +1591,7 @@ struct compat_loop_info {
	compat_ulong_t	lo_inode;       /* ioctl r/o */
	compat_dev_t	lo_rdevice;     /* ioctl r/o */
	compat_int_t	lo_offset;
	compat_int_t	lo_encrypt_type;        /* obsolete, ignored */
	compat_int_t	lo_encrypt_key_size;    /* ioctl w/o */
	compat_int_t	lo_flags;       /* ioctl r/o */
	char		lo_name[LO_NAME_SIZE];
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ static void n64cart_submit_bio(struct bio *bio)
{
	struct bio_vec bvec;
	struct bvec_iter iter;
	struct device *dev = bio->bi_disk->private_data;
	struct device *dev = bio->bi_bdev->bd_disk->private_data;
	u32 pos = bio->bi_iter.bi_sector << SECTOR_SHIFT;

	bio_for_each_segment(bvec, bio, iter) {
Loading