Thread (1 message) 1 message, 1 author, 2021-08-30

Re: [PATCH 1/1] virtio-blk: add num_io_queues module parameter

flat view

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-08-30 16:49:28
Also in: kvm, linux-block

On Mon, Aug 30, 2021 at 03:00:23PM +0300, Max Gurtovoy wrote:
quoted hunk
+static int virtblk_queue_count_set(const char *val,
+		const struct kernel_param *kp)
+{
+	unsigned int n;
+	int ret;
+
+	ret = kstrtouint(val, 10, &n);
+	if (ret != 0 || n > nr_cpu_ids)
+		return -EINVAL;
+	return param_set_uint(val, kp);
+}

Thi can use param_set_uint_minmax.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help