Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Jens Axboe
72148aec 3719fa86

+17 -2
+5
block/Kconfig
··· 49 49 50 50 If unsure, say Y. 51 51 52 + config BLK_SCSI_REQUEST 53 + bool 54 + 52 55 config BLK_DEV_BSG 53 56 bool "Block layer SG support v4" 54 57 default y 58 + select BLK_SCSI_REQUEST 55 59 help 56 60 Saying Y here will enable generic SG (SCSI generic) v4 support 57 61 for any block device. ··· 75 71 bool "Block layer SG support v4 helper lib" 76 72 default n 77 73 select BLK_DEV_BSG 74 + select BLK_SCSI_REQUEST 78 75 help 79 76 Subsystems will normally enable this if needed. Users will not 80 77 normally need to manually enable this.
+3 -2
block/Makefile
··· 7 7 blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \ 8 8 blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \ 9 9 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 \ 11 11 badblocks.o partitions/ 12 12 13 - obj-$(CONFIG_BOUNCE) += bounce.o 13 + obj-$(CONFIG_BOUNCE) += bounce.o 14 + obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_ioctl.o 14 15 obj-$(CONFIG_BLK_DEV_BSG) += bsg.o 15 16 obj-$(CONFIG_BLK_DEV_BSGLIB) += bsg-lib.o 16 17 obj-$(CONFIG_BLK_CGROUP) += blk-cgroup.o
+4
drivers/block/Kconfig
··· 69 69 config GDROM 70 70 tristate "SEGA Dreamcast GD-ROM drive" 71 71 depends on SH_DREAMCAST 72 + select BLK_SCSI_REQUEST # only for the generic cdrom code 72 73 help 73 74 A standard SEGA Dreamcast comes with a modified CD ROM drive called a 74 75 "GD-ROM" by SEGA to signify it is capable of reading special disks ··· 115 114 tristate "Compaq Smart Array 5xxx support" 116 115 depends on PCI 117 116 select CHECK_SIGNATURE 117 + select BLK_SCSI_REQUEST 118 118 help 119 119 This is the driver for Compaq Smart Array 5xxx controllers. 120 120 Everyone using these boards should say Y here. ··· 388 386 config CDROM_PKTCDVD 389 387 tristate "Packet writing on CD/DVD media (DEPRECATED)" 390 388 depends on !UML 389 + select BLK_SCSI_REQUEST 391 390 help 392 391 Note: This driver is deprecated and will be removed from the 393 392 kernel in the near future! ··· 500 497 config VIRTIO_BLK 501 498 tristate "Virtio block driver" 502 499 depends on VIRTIO 500 + select BLK_SCSI_REQUEST 503 501 ---help--- 504 502 This is the virtual block driver for virtio. It can be used with 505 503 lguest or QEMU based VMMs (like KVM or Xen). Say Y or M.
+1
drivers/block/paride/Kconfig
··· 25 25 config PARIDE_PCD 26 26 tristate "Parallel port ATAPI CD-ROMs" 27 27 depends on PARIDE 28 + select BLK_SCSI_REQUEST # only for the generic cdrom code 28 29 ---help--- 29 30 This option enables the high-level driver for ATAPI CD-ROM devices 30 31 connected through a parallel port. If you chose to build PARIDE
+1
drivers/ide/Kconfig
··· 10 10 tristate "ATA/ATAPI/MFM/RLL support (DEPRECATED)" 11 11 depends on HAVE_IDE 12 12 depends on BLOCK 13 + select BLK_SCSI_REQUEST 13 14 ---help--- 14 15 If you say Y here, your kernel will be able to manage ATA/(E)IDE and 15 16 ATAPI units. The most common cases are IDE hard drives and ATAPI
+1
drivers/scsi/Kconfig
··· 18 18 depends on BLOCK 19 19 select SCSI_DMA if HAS_DMA 20 20 select SG_POOL 21 + select BLK_SCSI_REQUEST 21 22 ---help--- 22 23 If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or 23 24 any other SCSI device under Linux, say Y and make sure that you know
+1
drivers/target/Kconfig
··· 4 4 depends on SCSI && BLOCK 5 5 select CONFIGFS_FS 6 6 select CRC_T10DIF 7 + select BLK_SCSI_REQUEST # only for scsi_command_size_tbl.. 7 8 default n 8 9 help 9 10 Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled
+1
fs/nfsd/Kconfig
··· 104 104 depends on NFSD_V4 && BLOCK 105 105 select NFSD_PNFS 106 106 select EXPORTFS_BLOCK_OPS 107 + select BLK_SCSI_REQUEST 107 108 help 108 109 This option enables support for the exporting pNFS SCSI layouts 109 110 in the kernel's NFS server. The pNFS SCSI layout enables NFS