I interpreted CONFIG_VHOST_USER as controlling only QEMU's vhost-user
device frontends. However, virtiofsd and contrib/ vhost-user device
backends are also controlled by CONFIG_VHOST_USER. Make the
vhost-user-blk server depend on CONFIG_VHOST_USER for consistency.
Now the following error is printed when the vhost-user-blk server is
enabled without CONFIG_VHOST_USER:
$ ./configure --disable-vhost-user --enable-vhost-user-blk ...
../meson.build:761:8: ERROR: Problem encountered: vhost_user_blk_server requires vhost-user support
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 4f5c916557..ee3719da39 100644
--- a/meson.build
+++ b/meson.build
@@ -751,11 +751,14 @@ statx_test = '''
has_statx = cc.links(statx_test)
-have_vhost_user_blk_server = (targetos == 'linux')
+have_vhost_user_blk_server = (targetos == 'linux' and
+ 'CONFIG_VHOST_USER' in config_host)
if get_option('vhost_user_blk_server').enabled()
if targetos != 'linux'
error('vhost_user_blk_server requires linux')
+ elif 'CONFIG_VHOST_USER' not in config_host
+ error('vhost_user_blk_server requires vhost-user support')
endif
elif get_option('vhost_user_blk_server').disabled() or not have_system
have_vhost_user_blk_server = false
--
2.28.0
On 11/10/20 6:11 PM, Stefan Hajnoczi wrote: > I interpreted CONFIG_VHOST_USER as controlling only QEMU's vhost-user > device frontends. However, virtiofsd and contrib/ vhost-user device > backends are also controlled by CONFIG_VHOST_USER. Make the > vhost-user-blk server depend on CONFIG_VHOST_USER for consistency. Possible follow up cleanup is to rename variable including "frontend/backend". Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> > > Now the following error is printed when the vhost-user-blk server is > enabled without CONFIG_VHOST_USER: > > $ ./configure --disable-vhost-user --enable-vhost-user-blk ... > ../meson.build:761:8: ERROR: Problem encountered: vhost_user_blk_server requires vhost-user support > > Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com> > Suggested-by: Alex Bennée <alex.bennee@linaro.org> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> > --- > meson.build | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-)
On Wed, Nov 11, 2020 at 10:25:22AM +0100, Philippe Mathieu-Daudé wrote: > On 11/10/20 6:11 PM, Stefan Hajnoczi wrote: > > I interpreted CONFIG_VHOST_USER as controlling only QEMU's vhost-user > > device frontends. However, virtiofsd and contrib/ vhost-user device > > backends are also controlled by CONFIG_VHOST_USER. Make the > > vhost-user-blk server depend on CONFIG_VHOST_USER for consistency. > > Possible follow up cleanup is to rename variable including > "frontend/backend". Yes, vhost-user-blk-server and related names don't follow vhost-user terminology. Stefan
© 2016 - 2026 Red Hat, Inc.