From: Eric Sandeen <sandeen@redhat.com>
To: Li Wang <liwang@redhat.com>, Petr Vorel <pvorel@suse.cz>,
Zirong Lang <zlang@redhat.com>, Boyang Xue <bxue@redhat.com>
Cc: ltp@lists.linux.it, linux-xfs@vger.kernel.org
Subject: Re: [LTP] [PATCH] configure.ac: Add _GNU_SOURCE for struct fs_quota_statv check
Date: Wed, 19 Jun 2024 10:50:15 -0500 [thread overview]
Message-ID: <7aeebecc-d5ef-4eea-a4e5-ddbfa411ee1e@redhat.com> (raw)
In-Reply-To: <CAEemH2fH6tX9obxcVS6XJLcMvAvOz-JPe6wWoQdv26x8GAx2rQ@mail.gmail.com>
On 6/19/24 7:08 AM, Li Wang wrote:
> cc Eric Sandeen <sandeen@redhat.com <mailto:sandeen@redhat.com>> who is the author of:
If adding _GNU_SOURCE to the LTP configure.ac fixes the problem,
I have no concerns about that.
However, I also sent a patch to fix xfsprogs - having this wrapper in the
header is really unnecessary, and will likely cause problems for others
as well, so I just proposed removing it.
https://lore.kernel.org/linux-xfs/be7f0845-5d5f-4af5-9ca9-3e4370b47d97@sandeen.net/
(This problem only recently showed up due to other changes, see the explanation
in the link above)
Thanks,
-Eric
> commit 9d6023a856a1c4f84415dff59b0d5459cc8768db
> Author: Eric Sandeen <sandeen@redhat.com <mailto:sandeen@redhat.com>>
> Date: Thu Feb 27 15:05:48 2020 -0500
>
> libxfs: use FALLOC_FL_ZERO_RANGE in libxfs_device_zero
>
> On Wed, Jun 19, 2024 at 8:05 PM Li Wang <liwang@redhat.com <mailto:liwang@redhat.com>> wrote:
>
> Hi Petr, XFS-Experts,
>
> On Wed, Jun 19, 2024 at 5:27 PM Petr Vorel <pvorel@suse.cz <mailto:pvorel@suse.cz>> wrote:
>
> Hi Li,
>
> > These changes help ensure that the necessary features and definitions
> > are available during the configuration process, preventing potential
> > issues related to missing or incompatible definitions. This should
> > resolve the compilation error related to struct fs_quota_statv:
>
> > /usr/include/xfs/xqm.h:167:8: error: redefinition of ‘struct fs_qfilestatv’
>
> I wonder how _GNU_SOURCE influences any XFS header?
> I haven't found anything in (<xfs/*.h>) or in <sys/quota.h>
>
>
> With installing a newer xfsprogs-dev package on RHEL, we got a problem
> in configuring our LTP test.
>
> According to the inclusion relationship: "xfs/xqm.h" -> "xfs/xfs.h" -> "xfs/linux.h".
> The linux.h header introduces an inlined function that needs '_GNU_SOURCE' and <fcnctl.h>.
>
> $ git clone https://kernel.googlesource.com/pub/scm/fs/xfs/xfsprogs-dev <https://kernel.googlesource.com/pub/scm/fs/xfs/xfsprogs-dev>
> $ cd xfsprogs-dev/
> $ git describe --contains 9d6023a856a1c4f84415dff59b0d5459cc8768db
> v5.5.0-rc1~39
>
> #if defined(FALLOC_FL_ZERO_RANGE)
> static inline int
> platform_zero_range(
> int fd,
> xfs_off_t start,
> size_t len)
> {
> int ret;
>
> ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
> if (!ret)
> return 0;
> return -errno;
> }
> #else
> #define platform_zero_range(fd, s, l) (-EOPNOTSUPP)
> #endif
>
>
> My test version is based on 6.5 so contains the inlined function to build.
>
> # rpm -qf /usr/include/xfs/xqm.h
> xfsprogs-devel-6.5.0-3.el10.x86_64
>
>
>
> I know that some quotactl0[23].c define _GNU_SOURCE, but it's interesting that
> this influence the header. Also, which RHEL (or whatever distro) version has
> this problem?
>
>
> The error occurred (with install xfsprogs-devel) during the configure script
> checking struct fs_quota_statv. It failed to compile conftest.c and report
> such errors:
>
> configure:5697: checking for struct fs_quota_statv
> configure:5697: gcc -c -g -O2 conftest.c >&5
> In file included from /usr/include/xfs/xfs.h:9,
> from /usr/include/xfs/xqm.h:9,
> from conftest.c:138:
> /usr/include/xfs/linux.h: In function 'platform_zero_range':
> /usr/include/xfs/linux.h:188:15: error: implicit declaration of function 'fallocate' [-Wimplicit-function-declaration]
> 188 | ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
> | ^~~~~~~~~
> configure:5697: $? = 1
>
> It similarly to the above quotactl07 patchfix, so adding '#define _GNU_SOURCE'
> isactually formaking the fallocate()happy.
>
> Or, another way is the change made in "xfsprogs-dev/include/linux.h" otherwise we can't
> configure our LTP correctly.
>
>
> --
> Regards,
> Li Wang
>
>
>
> --
> Regards,
> Li Wang
WARNING: multiple messages have this Message-ID (diff)
From: Eric Sandeen <sandeen@redhat.com>
To: Li Wang <liwang@redhat.com>, Petr Vorel <pvorel@suse.cz>,
Zirong Lang <zlang@redhat.com>, Boyang Xue <bxue@redhat.com>
Cc: linux-xfs@vger.kernel.org, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] configure.ac: Add _GNU_SOURCE for struct fs_quota_statv check
Date: Wed, 19 Jun 2024 10:50:15 -0500 [thread overview]
Message-ID: <7aeebecc-d5ef-4eea-a4e5-ddbfa411ee1e@redhat.com> (raw)
In-Reply-To: <CAEemH2fH6tX9obxcVS6XJLcMvAvOz-JPe6wWoQdv26x8GAx2rQ@mail.gmail.com>
On 6/19/24 7:08 AM, Li Wang wrote:
> cc Eric Sandeen <sandeen@redhat.com <mailto:sandeen@redhat.com>> who is the author of:
If adding _GNU_SOURCE to the LTP configure.ac fixes the problem,
I have no concerns about that.
However, I also sent a patch to fix xfsprogs - having this wrapper in the
header is really unnecessary, and will likely cause problems for others
as well, so I just proposed removing it.
https://lore.kernel.org/linux-xfs/be7f0845-5d5f-4af5-9ca9-3e4370b47d97@sandeen.net/
(This problem only recently showed up due to other changes, see the explanation
in the link above)
Thanks,
-Eric
> commit 9d6023a856a1c4f84415dff59b0d5459cc8768db
> Author: Eric Sandeen <sandeen@redhat.com <mailto:sandeen@redhat.com>>
> Date: Thu Feb 27 15:05:48 2020 -0500
>
> libxfs: use FALLOC_FL_ZERO_RANGE in libxfs_device_zero
>
> On Wed, Jun 19, 2024 at 8:05 PM Li Wang <liwang@redhat.com <mailto:liwang@redhat.com>> wrote:
>
> Hi Petr, XFS-Experts,
>
> On Wed, Jun 19, 2024 at 5:27 PM Petr Vorel <pvorel@suse.cz <mailto:pvorel@suse.cz>> wrote:
>
> Hi Li,
>
> > These changes help ensure that the necessary features and definitions
> > are available during the configuration process, preventing potential
> > issues related to missing or incompatible definitions. This should
> > resolve the compilation error related to struct fs_quota_statv:
>
> > /usr/include/xfs/xqm.h:167:8: error: redefinition of ‘struct fs_qfilestatv’
>
> I wonder how _GNU_SOURCE influences any XFS header?
> I haven't found anything in (<xfs/*.h>) or in <sys/quota.h>
>
>
> With installing a newer xfsprogs-dev package on RHEL, we got a problem
> in configuring our LTP test.
>
> According to the inclusion relationship: "xfs/xqm.h" -> "xfs/xfs.h" -> "xfs/linux.h".
> The linux.h header introduces an inlined function that needs '_GNU_SOURCE' and <fcnctl.h>.
>
> $ git clone https://kernel.googlesource.com/pub/scm/fs/xfs/xfsprogs-dev <https://kernel.googlesource.com/pub/scm/fs/xfs/xfsprogs-dev>
> $ cd xfsprogs-dev/
> $ git describe --contains 9d6023a856a1c4f84415dff59b0d5459cc8768db
> v5.5.0-rc1~39
>
> #if defined(FALLOC_FL_ZERO_RANGE)
> static inline int
> platform_zero_range(
> int fd,
> xfs_off_t start,
> size_t len)
> {
> int ret;
>
> ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
> if (!ret)
> return 0;
> return -errno;
> }
> #else
> #define platform_zero_range(fd, s, l) (-EOPNOTSUPP)
> #endif
>
>
> My test version is based on 6.5 so contains the inlined function to build.
>
> # rpm -qf /usr/include/xfs/xqm.h
> xfsprogs-devel-6.5.0-3.el10.x86_64
>
>
>
> I know that some quotactl0[23].c define _GNU_SOURCE, but it's interesting that
> this influence the header. Also, which RHEL (or whatever distro) version has
> this problem?
>
>
> The error occurred (with install xfsprogs-devel) during the configure script
> checking struct fs_quota_statv. It failed to compile conftest.c and report
> such errors:
>
> configure:5697: checking for struct fs_quota_statv
> configure:5697: gcc -c -g -O2 conftest.c >&5
> In file included from /usr/include/xfs/xfs.h:9,
> from /usr/include/xfs/xqm.h:9,
> from conftest.c:138:
> /usr/include/xfs/linux.h: In function 'platform_zero_range':
> /usr/include/xfs/linux.h:188:15: error: implicit declaration of function 'fallocate' [-Wimplicit-function-declaration]
> 188 | ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
> | ^~~~~~~~~
> configure:5697: $? = 1
>
> It similarly to the above quotactl07 patchfix, so adding '#define _GNU_SOURCE'
> isactually formaking the fallocate()happy.
>
> Or, another way is the change made in "xfsprogs-dev/include/linux.h" otherwise we can't
> configure our LTP correctly.
>
>
> --
> Regards,
> Li Wang
>
>
>
> --
> Regards,
> Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-06-19 15:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 5:34 [LTP] [PATCH] configure.ac: Add _GNU_SOURCE for struct fs_quota_statv check Li Wang
2024-06-17 5:40 ` Li Wang
2024-06-19 9:27 ` Petr Vorel
2024-06-19 12:05 ` Li Wang
2024-06-19 12:08 ` Li Wang
2024-06-19 15:50 ` Eric Sandeen [this message]
2024-06-19 15:50 ` Eric Sandeen
2024-06-19 15:59 ` Petr Vorel
2024-06-19 15:59 ` Petr Vorel
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=7aeebecc-d5ef-4eea-a4e5-ddbfa411ee1e@redhat.com \
--to=sandeen@redhat.com \
--cc=bxue@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
--cc=zlang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.