From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 3/4] Move CONFIG_XFS handling to meson.build
Date: Tue, 2 Nov 2021 12:34:45 +0100 [thread overview]
Message-ID: <e02332c0-7c4e-18a2-5c33-b00e8045f6da@redhat.com> (raw)
In-Reply-To: <20211028185910.1729744-4-thuth@redhat.com>
On 28/10/21 20:59, Thomas Huth wrote:
> Checking for xfsctl() can be done more easily in meson.build. Also,
> this is not a "real" feature like the other features that we provide
> with the "--enable-xxx" and "--disable-xxx" switches for the
> configure script, since this does not influence lots of code (it's
> only about one call to xfsctl() in file-posix.c), so people don't
> gain much with the ability to disable this with "--disable-xfsctl".
> Let's rather treat this like the other cc.has_function() checks in
> meson.build, i.e. don't add a new option for this in meson_options.txt.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
I think we should just use ioctl and copy the relevant definitions from
Linux:
struct dioattr {
u32 d_mem; /* data buffer memory alignment */
u32 d_miniosz; /* min xfer size */
u32 d_maxiosz; /* max xfer size */
};
#define XFS_IOC_DIOINFO _IOR ('X', 30, struct dioattr)
Paolo
> ---
> configure | 31 -------------------------------
> meson.build | 2 +-
> 2 files changed, 1 insertion(+), 32 deletions(-)
>
> diff --git a/configure b/configure
> index 170b1b237a..2296c3e194 100755
> --- a/configure
> +++ b/configure
> @@ -287,7 +287,6 @@ for opt do
> done
>
> xen_ctrl_version="$default_feature"
> -xfs="$default_feature"
> membarrier="$default_feature"
> vhost_kernel="$default_feature"
> vhost_net="$default_feature"
> @@ -1019,10 +1018,6 @@ for opt do
> ;;
> --enable-opengl) opengl="yes"
> ;;
> - --disable-xfsctl) xfs="no"
> - ;;
> - --enable-xfsctl) xfs="yes"
> - ;;
> --disable-zlib-test)
> ;;
> --enable-guest-agent) guest_agent="yes"
> @@ -1477,7 +1472,6 @@ cat << EOF
> avx512f AVX512F optimization support
> replication replication support
> opengl opengl support
> - xfsctl xfsctl support
> qom-cast-debug cast debugging support
> tools build qemu-io, qemu-nbd and qemu-img tools
> bochs bochs image format support
> @@ -2385,28 +2379,6 @@ EOF
> fi
> fi
>
> -##########################################
> -# xfsctl() probe, used for file-posix.c
> -if test "$xfs" != "no" ; then
> - cat > $TMPC << EOF
> -#include <stddef.h> /* NULL */
> -#include <xfs/xfs.h>
> -int main(void)
> -{
> - xfsctl(NULL, 0, 0, NULL);
> - return 0;
> -}
> -EOF
> - if compile_prog "" "" ; then
> - xfs="yes"
> - else
> - if test "$xfs" = "yes" ; then
> - feature_not_found "xfs" "Install xfsprogs/xfslibs devel"
> - fi
> - xfs=no
> - fi
> -fi
> -
> ##########################################
> # plugin linker support probe
>
> @@ -3538,9 +3510,6 @@ echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
> if test "$block_drv_whitelist_tools" = "yes" ; then
> echo "CONFIG_BDRV_WHITELIST_TOOLS=y" >> $config_host_mak
> fi
> -if test "$xfs" = "yes" ; then
> - echo "CONFIG_XFS=y" >> $config_host_mak
> -fi
> qemu_version=$(head $source_path/VERSION)
> echo "PKGVERSION=$pkgversion" >>$config_host_mak
> echo "SRC_PATH=$source_path" >> $config_host_mak
> diff --git a/meson.build b/meson.build
> index 5bb6b901b0..2bd922f2f3 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1532,6 +1532,7 @@ config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and cc.has_functio
> config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs'))
> config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_range'))
> config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
> +config_host_data.set('CONFIG_XFS', cc.has_function('xfsctl', prefix: '#include <xfs/xfs.h>'))
> config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_range'))
> config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependencies: util))
> config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul'))
> @@ -3415,7 +3416,6 @@ if spice_protocol.found()
> summary_info += {' spice server support': spice}
> endif
> summary_info += {'rbd support': rbd}
> -summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')}
> summary_info += {'smartcard support': cacard}
> summary_info += {'U2F support': u2f}
> summary_info += {'libusb': libusb}
>
next prev parent reply other threads:[~2021-11-02 12:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 18:59 [PATCH 0/4] configure and meson.build improvements Thomas Huth
2021-10-28 18:59 ` [PATCH 1/4] configure: Remove the check for the __thread keyword Thomas Huth
2021-10-29 16:48 ` Richard Henderson
2021-11-02 11:37 ` Paolo Bonzini
2021-10-28 18:59 ` [PATCH 2/4] Move the l2tpv3 test from configure to meson.build Thomas Huth
2021-11-02 11:36 ` Paolo Bonzini
2021-10-28 18:59 ` [PATCH 3/4] Move CONFIG_XFS handling " Thomas Huth
2021-11-02 11:34 ` Paolo Bonzini [this message]
2021-11-02 11:38 ` Thomas Huth
2021-11-02 11:50 ` Paolo Bonzini
2021-12-10 7:53 ` Thomas Huth
2021-12-10 8:39 ` Paolo Bonzini
2021-12-10 8:46 ` Thomas Huth
2021-12-10 10:10 ` Paolo Bonzini
2021-12-14 9:15 ` Thomas Huth
2021-10-28 18:59 ` [PATCH 4/4] Move the libssh setup from configure " Thomas Huth
2021-10-29 6:09 ` Thomas Huth
2021-11-02 11:36 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e02332c0-7c4e-18a2-5c33-b00e8045f6da@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).