]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: bsg: Increase number of devices
authorHannes Reinecke <hare@suse.de>
Wed, 14 Jun 2023 10:36:10 +0000 (12:36 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 16 Jun 2023 16:19:59 +0000 (12:19 -0400)
Larger setups may need to allocate more than 32k bsg devices, so increase
the number of devices to the full range of minor device numbers.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Link: https://lore.kernel.org/r/20230614103616.31857-2-mwilck@suse.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
block/bsg.c

index 7eca43f33d7ff8f6e2ef8f56908feea5c280768a..c53f24243bf2438cac62ce39c67fbb9a91a73d28 100644 (file)
@@ -36,7 +36,7 @@ static inline struct bsg_device *to_bsg_device(struct inode *inode)
 }
 
 #define BSG_DEFAULT_CMDS       64
-#define BSG_MAX_DEVS           32768
+#define BSG_MAX_DEVS           (1 << MINORBITS)
 
 static DEFINE_IDA(bsg_minor_ida);
 static struct class *bsg_class;