diff mbox series

virtio-blk: select CONFIG_SG_POOL

Message ID 20211027082433.52616-1-arnd@kernel.org (mailing list archive)
State New, archived
Headers show
Series virtio-blk: select CONFIG_SG_POOL | expand

Commit Message

Arnd Bergmann Oct. 27, 2021, 8:24 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/block/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael S. Tsirkin Oct. 27, 2021, 8:56 a.m. UTC | #1
On Wed, Oct 27, 2021 at 10:24:13AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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

> ---
>  drivers/block/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
> index d97eaf6adb6d..2a51dfb09c8f 100644
> --- a/drivers/block/Kconfig
> +++ b/drivers/block/Kconfig
> @@ -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.
> -- 
> 2.29.2
Max Gurtovoy Oct. 27, 2021, 8:56 a.m. UTC | #2
This is strange, I've sent V3 with this code included.

MST,

which version did you take to your tree ?


On 10/27/2021 11:24 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/block/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
> index d97eaf6adb6d..2a51dfb09c8f 100644
> --- a/drivers/block/Kconfig
> +++ b/drivers/block/Kconfig
> @@ -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.
Michael S. Tsirkin Oct. 27, 2021, 9:10 a.m. UTC | #3
https://lore.kernel.org/r/20210901131434.31158-1-mgurtovoy@nvidia.com

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


On Wed, Oct 27, 2021 at 11:56:20AM +0300, Max Gurtovoy wrote:
> This is strange, I've sent V3 with this code included.
> 
> MST,
> 
> which version did you take to your tree ?
> 
> 
> On 10/27/2021 11:24 AM, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > 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")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >   drivers/block/Kconfig | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
> > index d97eaf6adb6d..2a51dfb09c8f 100644
> > --- a/drivers/block/Kconfig
> > +++ b/drivers/block/Kconfig
> > @@ -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.
diff mbox series

Patch

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index d97eaf6adb6d..2a51dfb09c8f 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -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.