samples: fix missing nodiratime option and handle propagate_from correctly
PATCH 1/1 samples: fix missing nodiratime option and handle propagate_from correctly
The nodiratime option is not currently shown. Also, the test for when to display propagate_from: is incorrect. Make it work like it does in show_mountinfo().
---
It might be best to just squash this patch into the one that adds the new sample program. Also, looks like your vfs-6.14.misc branch hasn't been updated yet?
--- samples/vfs/mountinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
samples/vfs/mountinfo.c +3 -1
@@ -90,6 +90,8 @@ static void show_mnt_attrs(uint64_t flags)break ; } +if (flags &MOUNT_ATTR_NODIRATIME ) +printf (",nodiratime" );if (flags &MOUNT_ATTR_NOSYMFOLLOW )printf (",nosymfollow" );if (flags &MOUNT_ATTR_IDMAP )
@@ -102,7 +104,7 @@ static void show_propagation(struct statmount *sm)printf (" shared:%llu" , sm->mnt_peer_group);if (sm->mnt_propagation &MS_SLAVE ) {printf (" master:%llu" , sm->mnt_master); -if (sm->mnt_master) +if (sm->propagate_from && sm->propagate_from != sm->mnt_master)printf (" propagate_from:%llu" , sm->propagate_from); }if (sm->mnt_propagation &MS_UNBINDABLE )
---
base-commit: ee05701bd2a2e4559f35742d59922ebb9b006d3c
change-id: 20241121-statmount-924ab4233d6e
Best regards,
Signature · 1 line
Jeff Layton <[email protected]>
Christian Brauner
maintainerQuoted 9 lines · Jeff Layton
The nodiratime option is not currently shown. Also, the test for when to display
propagate_from: is incorrect. Make it work like it does inshow_mountinfo().Signed-off-by Jeff Layton <[email protected]>---
It might be best to just squash this patch into the one that adds the new sample program. Also, looks like your vfs-6.14.misc branch hasn't been updated yet?
I have not pushed it out but will do so now!
Quoted 35 lines
--- samples/vfs/mountinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)samples/vfs/mountinfo.c +3
-2@@ -90,6 +90,8 @@ static void show_mnt_attrs(uint64_t flags)break ; } +if (flags &MOUNT_ATTR_NODIRATIME ) +printf (",nodiratime" );if (flags &MOUNT_ATTR_NOSYMFOLLOW )printf (",nosymfollow" );if (flags &MOUNT_ATTR_IDMAP )@@ -102,7 +104,7 @@ static void show_propagation(struct statmount *sm)printf (" shared:%llu" , sm->mnt_peer_group);if (sm->mnt_propagation &MS_SLAVE ) {printf (" master:%llu" , sm->mnt_master); -if (sm->mnt_master) +if (sm->propagate_from && sm->propagate_from != sm->mnt_master)printf (" propagate_from:%llu" , sm->propagate_from); }if (sm->mnt_propagation &MS_UNBINDABLE ) ---base-commit:
ee05701bd2a2e4559f35742d59922ebb9b006d3c
change-id: 20241121-statmount-924ab4233d6eBest regards,
Signature · 1 line
Jeff Layton <[email protected]>