Commit f8eacd8a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'block-6.12-20241018' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Keith:
     - Fix target passthrough identifier (Nilay)
     - Fix tcp locking (Hannes)
     - Replace list with sbitmap for tracking RDMA rsp tags (Guixen)
     - Remove unnecessary fallthrough statements (Tokunori)
     - Remove ready-without-media support (Greg)
     - Fix multipath partition scan deadlock (Keith)
     - Fix concurrent PCI reset and remove queue mapping (Maurizio)
     - Fabrics shutdown fixes (Nilay)

 - Fix for a kerneldoc warning (Keith)

 - Fix a race with blk-rq-qos and wakeups (Omar)

 - Cleanup of checking for always-set tag_set (SurajSonawane2415)

 - Fix for a crash with CPU hotplug notifiers (Ming)

 - Don't allow zero-copy ublk on unprivileged device (Ming)

 - Use array_index_nospec() for CDROM (Josh)

 - Remove dead code in drbd (David)

 - Tweaks to elevator loading (Breno)

* tag 'block-6.12-20241018' of git://git.kernel.dk/linux:
  cdrom: Avoid barrier_nospec() in cdrom_ioctl_media_changed()
  nvme: use helper nvme_ctrl_state in nvme_keep_alive_finish function
  nvme: make keep-alive synchronous operation
  nvme-loop: flush off pending I/O while shutting down loop controller
  nvme-pci: fix race condition between reset and nvme_dev_disable()
  ublk: don't allow user copy for unprivileged device
  blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race
  nvme-multipath: defer partition scanning
  blk-mq: setup queue ->tag_set before initializing hctx
  elevator: Remove argument from elevator_find_get
  elevator: do not request_module if elevator exists
  drbd: Remove unused conn_lowest_minor
  nvme: disable CC.CRIME (NVME_CC_CRIME)
  nvme: delete unnecessary fallthru comment
  nvmet-rdma: use sbitmap to replace rsp free list
  block: Fix elevator_get_default() checking for NULL q->tag_set
  nvme: tcp: avoid race between queue_lock lock and destroy
  nvmet-passthru: clear EUID/NGUID/UUID while using loop target
  block: fix blk_rq_map_integrity_sg kernel-doc
parents a041f478 b0bf1afd
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -4310,6 +4310,12 @@ int blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
	/* mark the queue as mq asap */
	q->mq_ops = set->ops;

	/*
	 * ->tag_set has to be setup before initialize hctx, which cpuphp
	 * handler needs it for checking queue mapping
	 */
	q->tag_set = set;

	if (blk_mq_alloc_ctxs(q))
		goto err_exit;

@@ -4328,8 +4334,6 @@ int blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
	INIT_WORK(&q->timeout_work, blk_mq_timeout_work);
	blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30 * HZ);

	q->tag_set = set;

	q->queue_flags |= QUEUE_FLAG_MQ_DEFAULT;

	INIT_DELAYED_WORK(&q->requeue_work, blk_mq_requeue_work);
+1 −1
Original line number Diff line number Diff line
@@ -219,8 +219,8 @@ static int rq_qos_wake_function(struct wait_queue_entry *curr,

	data->got_token = true;
	smp_wmb();
	list_del_init(&curr->entry);
	wake_up_process(data->task);
	list_del_init_careful(&curr->entry);
	return 1;
}

+14 −7
Original line number Diff line number Diff line
@@ -106,8 +106,7 @@ static struct elevator_type *__elevator_find(const char *name)
	return NULL;
}

static struct elevator_type *elevator_find_get(struct request_queue *q,
		const char *name)
static struct elevator_type *elevator_find_get(const char *name)
{
	struct elevator_type *e;

@@ -551,7 +550,7 @@ EXPORT_SYMBOL_GPL(elv_unregister);
static inline bool elv_support_iosched(struct request_queue *q)
{
	if (!queue_is_mq(q) ||
	    (q->tag_set && (q->tag_set->flags & BLK_MQ_F_NO_SCHED)))
	    (q->tag_set->flags & BLK_MQ_F_NO_SCHED))
		return false;
	return true;
}
@@ -562,14 +561,14 @@ static inline bool elv_support_iosched(struct request_queue *q)
 */
static struct elevator_type *elevator_get_default(struct request_queue *q)
{
	if (q->tag_set && q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT)
	if (q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT)
		return NULL;

	if (q->nr_hw_queues != 1 &&
	    !blk_mq_is_shared_tags(q->tag_set->flags))
		return NULL;

	return elevator_find_get(q, "mq-deadline");
	return elevator_find_get("mq-deadline");
}

/*
@@ -697,7 +696,7 @@ static int elevator_change(struct request_queue *q, const char *elevator_name)
	if (q->elevator && elevator_match(q->elevator->type, elevator_name))
		return 0;

	e = elevator_find_get(q, elevator_name);
	e = elevator_find_get(elevator_name);
	if (!e)
		return -EINVAL;
	ret = elevator_switch(q, e);
@@ -709,13 +708,21 @@ int elv_iosched_load_module(struct gendisk *disk, const char *buf,
			    size_t count)
{
	char elevator_name[ELV_NAME_MAX];
	struct elevator_type *found;
	const char *name;

	if (!elv_support_iosched(disk->queue))
		return -EOPNOTSUPP;

	strscpy(elevator_name, buf, sizeof(elevator_name));
	name = strstrip(elevator_name);

	request_module("%s-iosched", strstrip(elevator_name));
	spin_lock(&elv_list_lock);
	found = __elevator_find(name);
	spin_unlock(&elv_list_lock);

	if (!found)
		request_module("%s-iosched", name);

	return 0;
}
+0 −1
Original line number Diff line number Diff line
@@ -1364,7 +1364,6 @@ extern struct bio_set drbd_io_bio_set;

extern struct mutex resources_mutex;

extern int conn_lowest_minor(struct drbd_connection *connection);
extern enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsigned int minor);
extern void drbd_destroy_device(struct kref *kref);
extern void drbd_delete_device(struct drbd_device *device);
+0 −14
Original line number Diff line number Diff line
@@ -471,20 +471,6 @@ void _drbd_thread_stop(struct drbd_thread *thi, int restart, int wait)
		wait_for_completion(&thi->stop);
}

int conn_lowest_minor(struct drbd_connection *connection)
{
	struct drbd_peer_device *peer_device;
	int vnr = 0, minor = -1;

	rcu_read_lock();
	peer_device = idr_get_next(&connection->peer_devices, &vnr);
	if (peer_device)
		minor = device_to_minor(peer_device->device);
	rcu_read_unlock();

	return minor;
}

#ifdef CONFIG_SMP
/*
 * drbd_calc_cpu_mask() - Generate CPU masks, spread over all CPUs
Loading