Skip to content

Commit 72148ae

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: make scsi_request and scsi ioctl support optional
We only need this code to support scsi, ide, cciss and virtio. And at least for virtio it's a deprecated feature to start with. This should shrink the kernel size for embedded device that only use, say eMMC a bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 3719fa8 commit 72148ae

8 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎block/Kconfig‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ config LBDAF
4949

5050
If unsure, say Y.
5151

52+
config BLK_SCSI_REQUEST
53+
bool
54+
5255
config BLK_DEV_BSG
5356
bool "Block layer SG support v4"
5457
default y
58+
select BLK_SCSI_REQUEST
5559
help
5660
Saying Y here will enable generic SG (SCSI generic) v4 support
5761
for any block device.
@@ -71,6 +75,7 @@ config BLK_DEV_BSGLIB
7175
bool "Block layer SG support v4 helper lib"
7276
default n
7377
select BLK_DEV_BSG
78+
select BLK_SCSI_REQUEST
7479
help
7580
Subsystems will normally enable this if needed. Users will not
7681
normally need to manually enable this.

‎block/Makefile‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ obj-$(CONFIG_BLOCK) := bio.o elevator.o blk-core.o blk-tag.o blk-sysfs.o \
77
blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \
88
blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
99
blk-mq-sysfs.o blk-mq-cpumap.o blk-mq-sched.o ioctl.o \
10-
genhd.o scsi_ioctl.o partition-generic.o ioprio.o \
10+
genhd.o partition-generic.o ioprio.o \
1111
badblocks.o partitions/
1212

13-
obj-$(CONFIG_BOUNCE) += bounce.o
13+
obj-$(CONFIG_BOUNCE) += bounce.o
14+
obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_ioctl.o
1415
obj-$(CONFIG_BLK_DEV_BSG) += bsg.o
1516
obj-$(CONFIG_BLK_DEV_BSGLIB) += bsg-lib.o
1617
obj-$(CONFIG_BLK_CGROUP) += blk-cgroup.o

‎drivers/block/Kconfig‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ config AMIGA_Z2RAM
6969
config GDROM
7070
tristate "SEGA Dreamcast GD-ROM drive"
7171
depends on SH_DREAMCAST
72+
select BLK_SCSI_REQUEST # only for the generic cdrom code
7273
help
7374
A standard SEGA Dreamcast comes with a modified CD ROM drive called a
7475
"GD-ROM" by SEGA to signify it is capable of reading special disks
@@ -114,6 +115,7 @@ config BLK_CPQ_CISS_DA
114115
tristate "Compaq Smart Array 5xxx support"
115116
depends on PCI
116117
select CHECK_SIGNATURE
118+
select BLK_SCSI_REQUEST
117119
help
118120
This is the driver for Compaq Smart Array 5xxx controllers.
119121
Everyone using these boards should say Y here.
@@ -386,6 +388,7 @@ config BLK_DEV_RAM_DAX
386388
config CDROM_PKTCDVD
387389
tristate "Packet writing on CD/DVD media (DEPRECATED)"
388390
depends on !UML
391+
select BLK_SCSI_REQUEST
389392
help
390393
Note: This driver is deprecated and will be removed from the
391394
kernel in the near future!
@@ -497,6 +500,7 @@ config XEN_BLKDEV_BACKEND
497500
config VIRTIO_BLK
498501
tristate "Virtio block driver"
499502
depends on VIRTIO
503+
select BLK_SCSI_REQUEST
500504
---help---
501505
This is the virtual block driver for virtio. It can be used with
502506
lguest or QEMU based VMMs (like KVM or Xen). Say Y or M.

‎drivers/block/paride/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ config PARIDE_PD
2525
config PARIDE_PCD
2626
tristate "Parallel port ATAPI CD-ROMs"
2727
depends on PARIDE
28+
select BLK_SCSI_REQUEST # only for the generic cdrom code
2829
---help---
2930
This option enables the high-level driver for ATAPI CD-ROM devices
3031
connected through a parallel port. If you chose to build PARIDE

‎drivers/ide/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ menuconfig IDE
1010
tristate "ATA/ATAPI/MFM/RLL support (DEPRECATED)"
1111
depends on HAVE_IDE
1212
depends on BLOCK
13+
select BLK_SCSI_REQUEST
1314
---help---
1415
If you say Y here, your kernel will be able to manage ATA/(E)IDE and
1516
ATAPI units. The most common cases are IDE hard drives and ATAPI

‎drivers/scsi/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ config SCSI
1818
depends on BLOCK
1919
select SCSI_DMA if HAS_DMA
2020
select SG_POOL
21+
select BLK_SCSI_REQUEST
2122
---help---
2223
If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
2324
any other SCSI device under Linux, say Y and make sure that you know

‎drivers/target/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ menuconfig TARGET_CORE
44
depends on SCSI && BLOCK
55
select CONFIGFS_FS
66
select CRC_T10DIF
7+
select BLK_SCSI_REQUEST # only for scsi_command_size_tbl..
78
default n
89
help
910
Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled

‎fs/nfsd/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ config NFSD_SCSILAYOUT
104104
depends on NFSD_V4 && BLOCK
105105
select NFSD_PNFS
106106
select EXPORTFS_BLOCK_OPS
107+
select BLK_SCSI_REQUEST
107108
help
108109
This option enables support for the exporting pNFS SCSI layouts
109110
in the kernel's NFS server. The pNFS SCSI layout enables NFS

0 commit comments

Comments
 (0)