Skip to contentSkip to conversation

Inline contents of BLK_MQ_VIRTIO config

PATCH In review Ram Muthiah 2 participants 4 messages Mar 11, 2020 – Mar 19, 2020 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Inline contents of BLK_MQ_VIRTIO config

The config contains one symbol and is a dep of only two configs. Inlined this symbol so that it's built in by the two configs which need it and deleted the config.

---
 block/Kconfig                 |  5 ----
 block/Makefile                |  1 -
 block/blk-mq-virtio.c         | 46 -----------------------------------
 include/linux/blk-mq-virtio.h | 43 +++++++++++++++++++++++++++++---
 4 files changed, 39 insertions(+), 56 deletions(-)
 delete mode 100644 block/blk-mq-virtio.c
block/Kconfig +0 -5
index 3bc76bb113a0..953744daff7c 100644
@@ -203,11 +203,6 @@ config BLK_MQ_PCI
 	depends on BLOCK && PCI
 	default y
 
-config BLK_MQ_VIRTIO
-	bool
-	depends on BLOCK && VIRTIO
-	default y
-
 config BLK_MQ_RDMA
 	bool
 	depends on BLOCK && INFINIBAND
block/Makefile +0 -1
index 1a43750f4b01..709695f54150 100644
@@ -29,7 +29,6 @@ obj-$(CONFIG_BLK_CMDLINE_PARSER)	+= cmdline-parser.o
 obj-$(CONFIG_BLK_DEV_INTEGRITY) += bio-integrity.o blk-integrity.o
 obj-$(CONFIG_BLK_DEV_INTEGRITY_T10)	+= t10-pi.o
 obj-$(CONFIG_BLK_MQ_PCI)	+= blk-mq-pci.o
-obj-$(CONFIG_BLK_MQ_VIRTIO)	+= blk-mq-virtio.o
 obj-$(CONFIG_BLK_MQ_RDMA)	+= blk-mq-rdma.o
 obj-$(CONFIG_BLK_DEV_ZONED)	+= blk-zoned.o
 obj-$(CONFIG_BLK_WBT)		+= blk-wbt.o
block/blk-mq-virtio.c deleted +0 -46

46 lines not on this page · raw message

include/linux/blk-mq-virtio.h +39 -4

50 lines not on this page · raw message

Signature · 1 line
2.25.1.481.gfbce0eb801-goog
#1 lore raw
Quoted 3 lines · Ram Muthiah

The config contains one symbol and is a dep of only two configs. Inlined this symbol so that it's built in by the two configs which need it and deleted the config.

So now we build the code twice instead of once. Nevermind that you have dropped the copyright noticed. What is the point?

#2 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 3 lines · Ram Muthiah

The config contains one symbol and is a dep of only two configs. Inlined this symbol so that it's built in by the two configs which need it and deleted the config.

So now we build the code twice instead of once. Nevermind that you have dropped the copyright noticed. What is the point?

The android kernel team is working towards generating a generic kernel that can be used across many devices. One of the devices in question is cuttlefish, a android virtual device that relies on virtio blk.

The config here, blk_mq_virtio, is needed for virtio-blk but it is binary. blk-mq-virtio cannot be built into this generic kernel in the interest of keeping all virtio related configs as modules. (This compromise is needed to enable all physical devices to run this generic kernel.)

To fix this problem, there are two paths forward that I see. The patch proposed fixes the problem by inling the one symbol blk_mq_virtio has since this symbol is used in just two tristate virtio configs. Additionally, the symbol is fairly small so this doesn't seem like a bad solution.

Alternatively, I could modularize blk-mq-virtio. It does look like this config was meant to be tristate based on the include of the module header and the export of blk_mq_virtio_map_queues.

If the latter approach is preferred, I'd be happy to resubmit the patch.

#3 lore raw
Quoted 5 lines · Ram Muthiah

The config here, blk_mq_virtio, is needed for virtio-blk but it is binary. blk-mq-virtio cannot be built into this generic kernel in the interest of keeping all virtio related configs as modules. (This compromise is needed to enable all physical devices to run this generic kernel.)

But that is your personal problem and doesn't otherwise matter. Stop having stupid policies based on stupid promises and your will be much easier.

Quoted 1 line

To fix this problem,

It is not in any meaningful way a problem. Stop creating problems where none actually exist.