Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
@ 2025-06-02 17:08 Petr Vorel
  2025-06-02 17:08 ` [LTP] [PATCH 2/2] lapi/mount.h: Add missing mnt_ns_id member Petr Vorel
  2025-06-03 10:35 ` [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Cyril Hrubis
  0 siblings, 2 replies; 10+ messages in thread
From: Petr Vorel @ 2025-06-02 17:08 UTC (permalink / raw)
  To: ltp

We decided in a2300dc0f5 to remove <linux/mount.h> in lapi/mount.h and
use only <sys/mount.h>. But later in 5c5411ea8e we add autotools checks
in configure.ac which use <linux/mount.h> for detection, but kept using
lapi/mount.h. This worked until now, because no toolchain used new
header enough. Recent Alpine update broke that.

This fixes CI build on Alpine v3.22 (the default Alpine version in
GitHub action), which uses 6.14.2 kernel headers, which already define
struct mnt_id_req (configure.ac detect it but lapi/mount.h was not using
a correct header):

    listmount.h: In function 'listmount':
    listmount.h:18:16: error: variable 'req' has initializer but incomplete type
       18 |         struct mnt_id_req req = {
	  |                ^~~~~~~~~~

Fixes: 5c5411ea8e ("Add listmount/statmount fallback declarations")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,

CI fix (needed to fix already broken CI) for:
https://github.com/linux-test-project/ltp/actions/runs/15395092145/job/43318766502

Alternatively we could use our lapi differently:
lapi/mount.h for <sys/mount.h>
lapi/fsmount.h for <linux/mount.h> (and move there struct mnt_id_req
fallback definition).

If this looks better to you, maybe we should rename these 2 lapi headers
to make it obvious if they use kernel or libc header.

It's not clear to me how we want to use the headers: <sys/mount.h> for
old traditional mount things and <linux/mount.h>? Or do we prefer to
stick with one of them? Probably not, because using <linux/mount.h>
would likely require fallback old things which are only in
<sys/mount.h>.

It's also not clear to me what is more important from testing point:
libc headers or kernel headers.

And we have more mess in <sys/mount.h> vs. <linux/mount.h> use, e.g.
struct mount_attr testing in configure.ac uses the headers differently
than include/lapi/fsmount.h use:

configure.ac
AC_CHECK_TYPES([struct mount_attr],,,[
#ifdef HAVE_MOUNT_SETATTR
# include <sys/mount.h>
#elif HAVE_LINUX_MOUNT_H
# include <linux/mount.h>
#endif
])

include/lapi/fsmount.h
#if !defined(HAVE_FSOPEN) && defined(HAVE_LINUX_MOUNT_H)
# include <linux/mount.h>
#else
# include <sys/mount.h>
#endif

This works now, but it can break any time.

Last, but not least, once we do unification cleanup we could probably
get rid of checking many long existing headers which are part of
AC_CHECK_HEADERS_ONCE. Many of them did existed back then when uapi creation
was done in 3.7-rc1 (and before), but 4.4 we officially support contains
quite a lot of them (e.g. linux/module.h).

Kind regards,
Petr

 configure.ac | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7f475f6b64..13cded692f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -253,8 +253,10 @@ AC_CHECK_TYPES([struct mount_attr],,,[
 
 AC_CHECK_TYPES([struct cachestat_range],,,[#include <sys/mman.h>])
 AC_CHECK_TYPES([struct cachestat],,,[#include <sys/mman.h>])
-AC_CHECK_TYPES([struct mnt_id_req],,,[#include <linux/mount.h>])
-AC_CHECK_TYPES([struct statmount],,,[#include <linux/mount.h>])
+
+# Defined in <linux/mount.h>, but include/lapi/mount.h includes <sys/mount.h> */
+AC_CHECK_TYPES([struct mnt_id_req],,,[#include <sys/mount.h>])
+AC_CHECK_TYPES([struct statmount],,,[#include <sys/mount.h>])
 
 # Tools knobs
 
-- 
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* [LTP] [PATCH 2/2] lapi/mount.h: Add missing mnt_ns_id member
  2025-06-02 17:08 [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Petr Vorel
@ 2025-06-02 17:08 ` Petr Vorel
  2025-06-24  9:20   ` Andrea Cervesato via ltp
  2025-06-03 10:35 ` [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Cyril Hrubis
  1 sibling, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2025-06-02 17:08 UTC (permalink / raw)
  To: ltp

It was added 09b31295f8330 ("fs: export the mount ns id via statmount")
in v6.10-rc1. It also added STATMOUNT_MNT_NS_ID definition, but that's
not needed yet.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Not needed for the fix (it can wait).

 include/lapi/mount.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/lapi/mount.h b/include/lapi/mount.h
index aea6bca77a..daca14e551 100644
--- a/include/lapi/mount.h
+++ b/include/lapi/mount.h
@@ -51,6 +51,7 @@ struct mnt_id_req {
 	uint32_t spare;
 	uint64_t mnt_id;
 	uint64_t param;
+	uint64_t mnt_ns_id;
 };
 #endif
 
-- 
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
  2025-06-02 17:08 [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Petr Vorel
  2025-06-02 17:08 ` [LTP] [PATCH 2/2] lapi/mount.h: Add missing mnt_ns_id member Petr Vorel
@ 2025-06-03 10:35 ` Cyril Hrubis
  2025-06-03 12:36   ` Jan Stancek via ltp
  2025-06-03 16:11   ` Petr Vorel
  1 sibling, 2 replies; 10+ messages in thread
From: Cyril Hrubis @ 2025-06-03 10:35 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
Let's push this now, it's simple enough and fixes the CI.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
  2025-06-03 10:35 ` [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Cyril Hrubis
@ 2025-06-03 12:36   ` Jan Stancek via ltp
  2025-06-03 12:40     ` Petr Vorel
  2025-06-03 16:11   ` Petr Vorel
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Stancek via ltp @ 2025-06-03 12:36 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

On Tue, Jun 3, 2025 at 12:35 PM Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> Let's push this now, it's simple enough and fixes the CI.

 +1
Acked-by: Jan Stancek <jstancek@redhat.com>

>
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
  2025-06-03 12:36   ` Jan Stancek via ltp
@ 2025-06-03 12:40     ` Petr Vorel
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2025-06-03 12:40 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi all,

Jan, Cyril, thanks for your review, this first fixing patch merged.
(Not the second one.)

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
  2025-06-03 10:35 ` [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Cyril Hrubis
  2025-06-03 12:36   ` Jan Stancek via ltp
@ 2025-06-03 16:11   ` Petr Vorel
  2025-06-04  8:39     ` Li Wang via ltp
  2025-06-04 13:13     ` Jan Stancek via ltp
  1 sibling, 2 replies; 10+ messages in thread
From: Petr Vorel @ 2025-06-03 16:11 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

Hi all,

> Hi!
> Let's push this now, it's simple enough and fixes the CI.

I'm sorry, it did not fix the problem due the old problem of indirect include
<linux/mount.h> by <linux/fs.h> on Alpine v3.22 (the default Alpine version in
GitHub action), which uses 6.14.2 kernel headers:

    In file included from /usr/include/linux/fs.h:19,
                     from /usr/include/linux/btrfs.h:29,
                     from statmount02.c:23:
    /usr/include/linux/mount.h:155:8: error: redefinition of 'struct statmount'
      155 | struct statmount {
          |        ^~~~~~~~~
    In file included from statmount.h:12,
                     from statmount02.c:20:
    ../../../../include/lapi/mount.h:58:8: note: originally defined here
       58 | struct statmount {
          |        ^~~~~~~~~
    /usr/include/linux/mount.h:193:8: error: redefinition of 'struct mnt_id_req'
      193 | struct mnt_id_req {
          |        ^~~~~~~~~~
    ../../../../include/lapi/mount.h:49:8: note: originally defined here
       49 | struct mnt_id_req {
          |        ^~~~~~~~~~

But we still support old Leap 42 (glibc 2.22 based), which requires for
statmount04.c old fallbacks for <sys/mount.h> but also new mount API
defined in <linux/mount.h>, otherwise it fails:

    statmount03.c:62:4: error: 'MS_PRIVATE' undeclared here (not in a function)
      { MS_PRIVATE, TST_TO_STR_(MS_PRIVATE) },
        ^
    statmount03.c:63:4: error: 'MS_SHARED' undeclared here (not in a function)
      { MS_SHARED, TST_TO_STR_(MS_SHARED) },
        ^
    statmount03.c:64:4: error: 'MS_SLAVE' undeclared here (not in a function)
      { MS_SLAVE, TST_TO_STR_(MS_SLAVE) },
        ^
    In file included from ../../../../include/tst_test.h:185:0,
                     from statmount.h:11,
                     from statmount04.c:21:
    statmount04.c: In function 'setup':
    statmount03.c:65:4: error: 'MS_UNBINDABLE' undeclared here (not in a function)
      { MS_UNBINDABLE, TST_TO_STR_(MS_UNBINDABLE) },
        ^
    statmount04.c:57:35: error: 'MS_BIND' undeclared (first use in this function)
      SAFE_MOUNT(DIR_A, DIR_A, "none", MS_BIND, NULL);
                                       ^
    ../../../../include/tst_safe_macros.h:244:25: note: in definition of macro 'SAFE_MOUNT'
          (filesystemtype), (mountflags), (data))
                             ^
    In file included from ../../../../include/tst_test.h:185:0,
                     from statmount.h:11,
                     from statmount03.c:21:
    statmount03.c: In function 'run':
    statmount04.c:57:35: note: each undeclared identifier is reported only once for each function it appears in
      SAFE_MOUNT(DIR_A, DIR_A, "none", MS_BIND, NULL);
                                       ^
    ../../../../include/tst_safe_macros.h:244:25: note: in definition of macro 'SAFE_MOUNT'
          (filesystemtype), (mountflags), (data))
                             ^
    statmount03.c:74:35: error: 'MS_BIND' undeclared (first use in this function)
      SAFE_MOUNT(DIR_B, DIR_A, "none", MS_BIND, NULL);

I suppose we should have 2 or 3 lapi files:

1) lapi/mount.h
mount definitions (guarded by #ifndef) - the old ones from <sys/mount.h> e.g.
MS_REC, MS_PRIVATE and probably the new ones from <linux/mount.h>, e.g.
MNT_ID_REQ_SIZE_VER0. None of <sys/mount.h> <linux/mount.h> should be included
in it.

2) lapi/linux_mount.h
mount structs (nowadays vast majority if not all from <linux/mount.h> only).
This header can include <linux/mount.h> and lapi/mount.h.
That allows to have configure.ac to safely use <linux/mount.h> for detection.

3) lapi/sys_mount.h
Optional helper header which would include lapi/mount.h and <sys/mount.h>
(to keep the current approach that lapi headers include system headers so that
tests does not need to do it.

WDYT?

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
  2025-06-03 16:11   ` Petr Vorel
@ 2025-06-04  8:39     ` Li Wang via ltp
  2025-06-04 13:13     ` Jan Stancek via ltp
  1 sibling, 0 replies; 10+ messages in thread
From: Li Wang via ltp @ 2025-06-04  8:39 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Wed, Jun 4, 2025 at 12:12 AM Petr Vorel <pvorel@suse.cz> wrote:

> Hi all,
>
> > Hi!
> > Let's push this now, it's simple enough and fixes the CI.
>
> I'm sorry, it did not fix the problem due the old problem of indirect
> include
> <linux/mount.h> by <linux/fs.h> on Alpine v3.22 (the default Alpine
> version in
> GitHub action), which uses 6.14.2 kernel headers:
>
>     In file included from /usr/include/linux/fs.h:19,
>                      from /usr/include/linux/btrfs.h:29,
>                      from statmount02.c:23:
>     /usr/include/linux/mount.h:155:8: error: redefinition of 'struct
> statmount'
>       155 | struct statmount {
>           |        ^~~~~~~~~
>     In file included from statmount.h:12,
>                      from statmount02.c:20:
>     ../../../../include/lapi/mount.h:58:8: note: originally defined here
>        58 | struct statmount {
>           |        ^~~~~~~~~
>     /usr/include/linux/mount.h:193:8: error: redefinition of 'struct
> mnt_id_req'
>       193 | struct mnt_id_req {
>           |        ^~~~~~~~~~
>     ../../../../include/lapi/mount.h:49:8: note: originally defined here
>        49 | struct mnt_id_req {
>           |        ^~~~~~~~~~
>
> But we still support old Leap 42 (glibc 2.22 based), which requires for
> statmount04.c old fallbacks for <sys/mount.h> but also new mount API
> defined in <linux/mount.h>, otherwise it fails:
>
>     statmount03.c:62:4: error: 'MS_PRIVATE' undeclared here (not in a
> function)
>       { MS_PRIVATE, TST_TO_STR_(MS_PRIVATE) },
>         ^
>     statmount03.c:63:4: error: 'MS_SHARED' undeclared here (not in a
> function)
>       { MS_SHARED, TST_TO_STR_(MS_SHARED) },
>         ^
>     statmount03.c:64:4: error: 'MS_SLAVE' undeclared here (not in a
> function)
>       { MS_SLAVE, TST_TO_STR_(MS_SLAVE) },
>         ^
>     In file included from ../../../../include/tst_test.h:185:0,
>                      from statmount.h:11,
>                      from statmount04.c:21:
>     statmount04.c: In function 'setup':
>     statmount03.c:65:4: error: 'MS_UNBINDABLE' undeclared here (not in a
> function)
>       { MS_UNBINDABLE, TST_TO_STR_(MS_UNBINDABLE) },
>         ^
>     statmount04.c:57:35: error: 'MS_BIND' undeclared (first use in this
> function)
>       SAFE_MOUNT(DIR_A, DIR_A, "none", MS_BIND, NULL);
>                                        ^
>     ../../../../include/tst_safe_macros.h:244:25: note: in definition of
> macro 'SAFE_MOUNT'
>           (filesystemtype), (mountflags), (data))
>                              ^
>     In file included from ../../../../include/tst_test.h:185:0,
>                      from statmount.h:11,
>                      from statmount03.c:21:
>     statmount03.c: In function 'run':
>     statmount04.c:57:35: note: each undeclared identifier is reported only
> once for each function it appears in
>       SAFE_MOUNT(DIR_A, DIR_A, "none", MS_BIND, NULL);
>                                        ^
>     ../../../../include/tst_safe_macros.h:244:25: note: in definition of
> macro 'SAFE_MOUNT'
>           (filesystemtype), (mountflags), (data))
>                              ^
>     statmount03.c:74:35: error: 'MS_BIND' undeclared (first use in this
> function)
>       SAFE_MOUNT(DIR_B, DIR_A, "none", MS_BIND, NULL);
>
> I suppose we should have 2 or 3 lapi files:
>
> 1) lapi/mount.h
> mount definitions (guarded by #ifndef) - the old ones from <sys/mount.h>
> e.g.
> MS_REC, MS_PRIVATE and probably the new ones from <linux/mount.h>, e.g.
> MNT_ID_REQ_SIZE_VER0. None of <sys/mount.h> <linux/mount.h> should be
> included
> in it.
>
> 2) lapi/linux_mount.h
> mount structs (nowadays vast majority if not all from <linux/mount.h>
> only).
> This header can include <linux/mount.h> and lapi/mount.h.
> That allows to have configure.ac to safely use <linux/mount.h> for
> detection.
>
> 3) lapi/sys_mount.h
> Optional helper header which would include lapi/mount.h and <sys/mount.h>
> (to keep the current approach that lapi headers include system headers so
> that
> tests does not need to do it.
>
> WDYT?
>

Sounds reasonable to me, we could have a try.


-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
  2025-06-03 16:11   ` Petr Vorel
  2025-06-04  8:39     ` Li Wang via ltp
@ 2025-06-04 13:13     ` Jan Stancek via ltp
  2025-06-04 14:30       ` Petr Vorel
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Stancek via ltp @ 2025-06-04 13:13 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Tue, Jun 3, 2025 at 6:12 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi all,
>
> > Hi!
> > Let's push this now, it's simple enough and fixes the CI.
>
> I'm sorry, it did not fix the problem due the old problem of indirect include
> <linux/mount.h> by <linux/fs.h> on Alpine v3.22 (the default Alpine version in
> GitHub action), which uses 6.14.2 kernel headers:
>
>     In file included from /usr/include/linux/fs.h:19,
>                      from /usr/include/linux/btrfs.h:29,
>                      from statmount02.c:23:

from statmount02.c:

The btrfs validation is currently skipped due to the lack of support for VFS
...
#include <linux/btrfs.h>

Does the test actually need linux/btrfs.h ?

>     /usr/include/linux/mount.h:155:8: error: redefinition of 'struct statmount'
>       155 | struct statmount {
>           |        ^~~~~~~~~
>     In file included from statmount.h:12,
>                      from statmount02.c:20:
>     ../../../../include/lapi/mount.h:58:8: note: originally defined here
>        58 | struct statmount {
>           |        ^~~~~~~~~
>     /usr/include/linux/mount.h:193:8: error: redefinition of 'struct mnt_id_req'
>       193 | struct mnt_id_req {
>           |        ^~~~~~~~~~
>     ../../../../include/lapi/mount.h:49:8: note: originally defined here
>        49 | struct mnt_id_req {
>           |        ^~~~~~~~~~
>
> But we still support old Leap 42 (glibc 2.22 based), which requires for
> statmount04.c old fallbacks for <sys/mount.h> but also new mount API
> defined in <linux/mount.h>, otherwise it fails:
>
>     statmount03.c:62:4: error: 'MS_PRIVATE' undeclared here (not in a function)
>       { MS_PRIVATE, TST_TO_STR_(MS_PRIVATE) },
>         ^
>     statmount03.c:63:4: error: 'MS_SHARED' undeclared here (not in a function)
>       { MS_SHARED, TST_TO_STR_(MS_SHARED) },
>         ^
>     statmount03.c:64:4: error: 'MS_SLAVE' undeclared here (not in a function)
>       { MS_SLAVE, TST_TO_STR_(MS_SLAVE) },
>         ^
>     In file included from ../../../../include/tst_test.h:185:0,
>                      from statmount.h:11,
>                      from statmount04.c:21:
>     statmount04.c: In function 'setup':
>     statmount03.c:65:4: error: 'MS_UNBINDABLE' undeclared here (not in a function)
>       { MS_UNBINDABLE, TST_TO_STR_(MS_UNBINDABLE) },
>         ^
>     statmount04.c:57:35: error: 'MS_BIND' undeclared (first use in this function)
>       SAFE_MOUNT(DIR_A, DIR_A, "none", MS_BIND, NULL);
>                                        ^
>     ../../../../include/tst_safe_macros.h:244:25: note: in definition of macro 'SAFE_MOUNT'
>           (filesystemtype), (mountflags), (data))
>                              ^
>     In file included from ../../../../include/tst_test.h:185:0,
>                      from statmount.h:11,
>                      from statmount03.c:21:
>     statmount03.c: In function 'run':
>     statmount04.c:57:35: note: each undeclared identifier is reported only once for each function it appears in
>       SAFE_MOUNT(DIR_A, DIR_A, "none", MS_BIND, NULL);
>                                        ^
>     ../../../../include/tst_safe_macros.h:244:25: note: in definition of macro 'SAFE_MOUNT'
>           (filesystemtype), (mountflags), (data))
>                              ^
>     statmount03.c:74:35: error: 'MS_BIND' undeclared (first use in this function)
>       SAFE_MOUNT(DIR_B, DIR_A, "none", MS_BIND, NULL);
>
> I suppose we should have 2 or 3 lapi files:
>
> 1) lapi/mount.h
> mount definitions (guarded by #ifndef) - the old ones from <sys/mount.h> e.g.
> MS_REC, MS_PRIVATE and probably the new ones from <linux/mount.h>, e.g.
> MNT_ID_REQ_SIZE_VER0. None of <sys/mount.h> <linux/mount.h> should be included
> in it.
>
> 2) lapi/linux_mount.h
> mount structs (nowadays vast majority if not all from <linux/mount.h> only).
> This header can include <linux/mount.h> and lapi/mount.h.
> That allows to have configure.ac to safely use <linux/mount.h> for detection.
>
> 3) lapi/sys_mount.h
> Optional helper header which would include lapi/mount.h and <sys/mount.h>
> (to keep the current approach that lapi headers include system headers so that
> tests does not need to do it.
>
> WDYT?
>
> Kind regards,
> Petr
>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers
  2025-06-04 13:13     ` Jan Stancek via ltp
@ 2025-06-04 14:30       ` Petr Vorel
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2025-06-04 14:30 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi all,

> On Tue, Jun 3, 2025 at 6:12 PM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi all,

> > > Hi!
> > > Let's push this now, it's simple enough and fixes the CI.

> > I'm sorry, it did not fix the problem due the old problem of indirect include
> > <linux/mount.h> by <linux/fs.h> on Alpine v3.22 (the default Alpine version in
> > GitHub action), which uses 6.14.2 kernel headers:

> >     In file included from /usr/include/linux/fs.h:19,
> >                      from /usr/include/linux/btrfs.h:29,
> >                      from statmount02.c:23:

> from statmount02.c:

> The btrfs validation is currently skipped due to the lack of support for VFS
> ...
> #include <linux/btrfs.h>

> Does the test actually need linux/btrfs.h ?

Jan, very good point, it really was not needed. Removal merged as fe8c0dac5a,
thank you!

> > I suppose we should have 2 or 3 lapi files:

> > 1) lapi/mount.h
> > mount definitions (guarded by #ifndef) - the old ones from <sys/mount.h> e.g.
> > MS_REC, MS_PRIVATE and probably the new ones from <linux/mount.h>, e.g.
> > MNT_ID_REQ_SIZE_VER0. None of <sys/mount.h> <linux/mount.h> should be included
> > in it.

> > 2) lapi/linux_mount.h
> > mount structs (nowadays vast majority if not all from <linux/mount.h> only).
> > This header can include <linux/mount.h> and lapi/mount.h.
> > That allows to have configure.ac to safely use <linux/mount.h> for detection.

> > 3) lapi/sys_mount.h
> > Optional helper header which would include lapi/mount.h and <sys/mount.h>
> > (to keep the current approach that lapi headers include system headers so that
> > tests does not need to do it.

I'll be pragmatic and although the above would be an improvement, I'll postpone
doing it until it's really needed.

Kind regards,
Petr

> > WDYT?

> > Kind regards,
> > Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 2/2] lapi/mount.h: Add missing mnt_ns_id member
  2025-06-02 17:08 ` [LTP] [PATCH 2/2] lapi/mount.h: Add missing mnt_ns_id member Petr Vorel
@ 2025-06-24  9:20   ` Andrea Cervesato via ltp
  0 siblings, 0 replies; 10+ messages in thread
From: Andrea Cervesato via ltp @ 2025-06-24  9:20 UTC (permalink / raw)
  To: Petr Vorel, ltp

Moved to Superseeded. Check statmount09 patch.

- Andrea

On 6/2/25 7:08 PM, Petr Vorel wrote:
> It was added 09b31295f8330 ("fs: export the mount ns id via statmount")
> in v6.10-rc1. It also added STATMOUNT_MNT_NS_ID definition, but that's
> not needed yet.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Not needed for the fix (it can wait).
>
>   include/lapi/mount.h | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/include/lapi/mount.h b/include/lapi/mount.h
> index aea6bca77a..daca14e551 100644
> --- a/include/lapi/mount.h
> +++ b/include/lapi/mount.h
> @@ -51,6 +51,7 @@ struct mnt_id_req {
>   	uint32_t spare;
>   	uint64_t mnt_id;
>   	uint64_t param;
> +	uint64_t mnt_ns_id;
>   };
>   #endif
>   

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2025-06-24  9:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-02 17:08 [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Petr Vorel
2025-06-02 17:08 ` [LTP] [PATCH 2/2] lapi/mount.h: Add missing mnt_ns_id member Petr Vorel
2025-06-24  9:20   ` Andrea Cervesato via ltp
2025-06-03 10:35 ` [LTP] [PATCH 1/2] configure: Fix build on kernel 6.14 headers Cyril Hrubis
2025-06-03 12:36   ` Jan Stancek via ltp
2025-06-03 12:40     ` Petr Vorel
2025-06-03 16:11   ` Petr Vorel
2025-06-04  8:39     ` Li Wang via ltp
2025-06-04 13:13     ` Jan Stancek via ltp
2025-06-04 14:30       ` Petr Vorel

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