mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	 linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] samples: fix missing nodiratime option and handle propagate_from correctly
Date: Fri, 22 Nov 2024 12:18:32 +0100	[thread overview]
Message-ID: <20241122-atemzug-boxen-d104f618c6b0@brauner> (raw)
In-Reply-To: <20241121-statmount-v1-1-09c85a7d5d50@kernel.org>

On Thu, Nov 21, 2024 at 09:39:44AM -0500, Jeff Layton wrote:
> 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().
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> 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!

> ---
>  samples/vfs/mountinfo.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/samples/vfs/mountinfo.c b/samples/vfs/mountinfo.c
> index d9f21113a93b7aa7606de2edfce5ad0d5bcf2056..349aaade4de53912b96eadb35bf1b7457b4b04fa 100644
> --- a/samples/vfs/mountinfo.c
> +++ b/samples/vfs/mountinfo.c
> @@ -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,
> -- 
> Jeff Layton <jlayton@kernel.org>
> 

      reply	other threads:[~2024-11-22 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 14:39 Jeff Layton
2024-11-22 11:18 ` Christian Brauner [this message]

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=20241122-atemzug-boxen-d104f618c6b0@brauner \
    --to=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®