public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-blk: select CONFIG_SG_POOL
@ 2021-10-27  8:24 Arnd Bergmann
  2021-10-27  8:56 ` Michael S. Tsirkin
  2021-10-27  8:56 ` Max Gurtovoy
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-10-27  8:24 UTC (permalink / raw)
  To: Jens Axboe, Michael S. Tsirkin, Stefan Hajnoczi, Feng Li,
	Max Gurtovoy, Israel Rukshin
  Cc: Arnd Bergmann, Martin K. Petersen, Damien Le Moal, linux-block,
	linux-kernel

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.
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio-blk: select CONFIG_SG_POOL
  2021-10-27  8:24 [PATCH] virtio-blk: select CONFIG_SG_POOL Arnd Bergmann
@ 2021-10-27  8:56 ` Michael S. Tsirkin
  2021-10-27  8:56 ` Max Gurtovoy
  1 sibling, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2021-10-27  8:56 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jens Axboe, Stefan Hajnoczi, Feng Li, Max Gurtovoy,
	Israel Rukshin, Arnd Bergmann, Martin K. Petersen, Damien Le Moal,
	linux-block, linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio-blk: select CONFIG_SG_POOL
  2021-10-27  8:24 [PATCH] virtio-blk: select CONFIG_SG_POOL Arnd Bergmann
  2021-10-27  8:56 ` Michael S. Tsirkin
@ 2021-10-27  8:56 ` Max Gurtovoy
  2021-10-27  9:10   ` Michael S. Tsirkin
  1 sibling, 1 reply; 4+ messages in thread
From: Max Gurtovoy @ 2021-10-27  8:56 UTC (permalink / raw)
  To: Arnd Bergmann, Jens Axboe, Michael S. Tsirkin, Stefan Hajnoczi,
	Feng Li, Israel Rukshin
  Cc: Arnd Bergmann, Martin K. Petersen, Damien Le Moal, linux-block,
	linux-kernel

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio-blk: select CONFIG_SG_POOL
  2021-10-27  8:56 ` Max Gurtovoy
@ 2021-10-27  9:10   ` Michael S. Tsirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2021-10-27  9:10 UTC (permalink / raw)
  To: Max Gurtovoy
  Cc: Arnd Bergmann, Jens Axboe, Stefan Hajnoczi, Feng Li,
	Israel Rukshin, Arnd Bergmann, Martin K. Petersen, Damien Le Moal,
	linux-block, linux-kernel

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-27  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-27  8:24 [PATCH] virtio-blk: select CONFIG_SG_POOL Arnd Bergmann
2021-10-27  8:56 ` Michael S. Tsirkin
2021-10-27  8:56 ` Max Gurtovoy
2021-10-27  9:10   ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox