Skip to contentSkip to conversation

virtio-blk: select CONFIG_SG_POOL

PATCH In review Arnd Bergmann 3 participants 4 messages Oct 27, 2021 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-blk: select CONFIG_SG_POOL

From: Arnd Bergmann <[email protected]>

Switching virtio-blk to the sg_pool interfaces causes a build failures when they are not part of the kernel:

drivers/block/virtio_blk.c:182:3: error: implicit declaration of function 'sg_free_table_chained' [-Werror,-Wimplicit-function-declaration]

                sg_free_table_chained(&vbr->sg_table,
                ^
drivers/block/virtio_blk.c:195:8: error: implicit declaration of function 'sg_alloc_table_chained' [-Werror,-Wimplicit-function-declaration]
        err = sg_alloc_table_chained(&vbr->sg_table,
              ^

Select this symbol through Kconfig, as is done for all other users.

Fixes b2c5221fd074 ("virtio-blk: avoid preallocating big SGL for data")
---
 drivers/block/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/block/Kconfig +1 -0
index d97eaf6adb6d..2a51dfb09c8f 100644
@@ -371,6 +371,7 @@ config XEN_BLKDEV_BACKEND
 config VIRTIO_BLK
 	tristate "Virtio block driver"
 	depends on VIRTIO
+	select SG_POOL
 	help
 	  This is the virtual block driver for virtio.  It can be used with
           QEMU based VMMs (like KVM or Xen).  Say Y or M.
Signature · 1 line
2.29.2
#1 lore raw
Quoted 12 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Switching virtio-blk to the sg_pool interfaces causes a build failures when they are not part of the kernel:

drivers/block/virtio_blk.c:182:3: error: implicit declaration of function 'sg_free_table_chained' [-Werror,-Wimplicit-function-declaration]

                sg_free_table_chained(&vbr->sg_table,
                ^
drivers/block/virtio_blk.c:195:8: error: implicit declaration of function 'sg_alloc_table_chained' [-Werror,-Wimplicit-function-declaration]
        err = sg_alloc_table_chained(&vbr->sg_table,
              ^
Quoted 5 lines

Select this symbol through Kconfig, as is done for all other users.

Fixes b2c5221fd074 ("virtio-blk: avoid preallocating big SGL for data")

I'll squash this to avoid bisect failures, ok?

Quoted 18 lines
---
 drivers/block/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/block/Kconfig +1 -0
index d97eaf6adb6d..2a51dfb09c8f 100644
@@ -371,6 +371,7 @@ config XEN_BLKDEV_BACKEND
 config VIRTIO_BLK
 	tristate "Virtio block driver"
 	depends on VIRTIO
+	select SG_POOL
 	help
 	  This is the virtual block driver for virtio.  It can be used with
           QEMU based VMMs (like KVM or Xen).  Say Y or M.
Signature · 1 line
2.29.2
#2 lore raw
In reply to Arnd Bergmann

This is strange, I've sent V3 with this code included.

MST,

which version did you take to your tree ?

Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Switching virtio-blk to the sg_pool interfaces causes a build failures when they are not part of the kernel:

drivers/block/virtio_blk.c:182:3: error: implicit declaration of function 'sg_free_table_chained' [-Werror,-Wimplicit-function-declaration]

                 sg_free_table_chained(&vbr->sg_table,
                 ^
drivers/block/virtio_blk.c:195:8: error: implicit declaration of function 'sg_alloc_table_chained' [-Werror,-Wimplicit-function-declaration]
         err = sg_alloc_table_chained(&vbr->sg_table,
               ^

Select this symbol through Kconfig, as is done for all other users.

Fixes b2c5221fd074 ("virtio-blk: avoid preallocating big SGL for data")
---
  drivers/block/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/block/Kconfig +1 -0
index d97eaf6adb6d..2a51dfb09c8f 100644
@@ -371,6 +371,7 @@ config XEN_BLKDEV_BACKEND
  config VIRTIO_BLK
  	tristate "Virtio block driver"
  	depends on VIRTIO
+	select SG_POOL
  	help
  	  This is the virtual block driver for virtio.  It can be used with
            QEMU based VMMs (like KVM or Xen).  Say Y or M.
#3 lore raw

https://lore.kernel.org/r/[email protected]

yes - it was there. I think I dropped it while resolving conflicts.
Thanks!

Quoted 41 lines · Max Gurtovoy

This is strange, I've sent V3 with this code included.

MST,

which version did you take to your tree ?

Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Switching virtio-blk to the sg_pool interfaces causes a build failures when they are not part of the kernel:

drivers/block/virtio_blk.c:182:3: error: implicit declaration of function 'sg_free_table_chained' [-Werror,-Wimplicit-function-declaration]

                 sg_free_table_chained(&vbr->sg_table,
                 ^
drivers/block/virtio_blk.c:195:8: error: implicit declaration of function 'sg_alloc_table_chained' [-Werror,-Wimplicit-function-declaration]
         err = sg_alloc_table_chained(&vbr->sg_table,
               ^

Select this symbol through Kconfig, as is done for all other users.

Fixes b2c5221fd074 ("virtio-blk: avoid preallocating big SGL for data")
---
  drivers/block/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/block/Kconfig +1 -0
index d97eaf6adb6d..2a51dfb09c8f 100644
@@ -371,6 +371,7 @@ config XEN_BLKDEV_BACKEND
  config VIRTIO_BLK
  	tristate "Virtio block driver"
  	depends on VIRTIO
+	select SG_POOL
  	help
  	  This is the virtual block driver for virtio.  It can be used with
            QEMU based VMMs (like KVM or Xen).  Say Y or M.