public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Jeff Layton <jlayton@kernel.org>
Cc: dsterba@suse.cz, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH] btrfs: update target inode's ctime on unlink
Date: Tue, 13 Aug 2024 15:00:24 +0200	[thread overview]
Message-ID: <20240813130024.GP25962@twin.jikos.cz> (raw)
In-Reply-To: <c0a0266cbb46694318e5eeb5248216779cb68442.camel@kernel.org>

On Mon, Aug 12, 2024 at 12:51:21PM -0400, Jeff Layton wrote:
> On Mon, 2024-08-12 at 18:42 +0200, David Sterba wrote:
> > On Mon, Aug 12, 2024 at 12:30:52PM -0400, Jeff Layton wrote:
> > > Unlink changes the link count on the target inode. POSIX mandates that
> > > the ctime must also change when this occurs.
> > 
> > Right, thanks. According to https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html:
> > 
> > Upon successful completion, unlink() shall mark for update the last data
> > modification and last file status change timestamps of the parent
> > directory. Also, if the file's link count is not 0, the last file status
> > change timestamp of the file shall be marked for update.
> > 
> 
> Weird way to phrase to that. IMO, we still want to stamp the inode's
> ctime even if the link count goes to 0. That's what Linux generally
> does, anyway. Oh well..
>  
> > 
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > 
> > Reviewed-by: David Sterba <dsterba@suse.com>
> 
> 
> FWIW, this should probably go in via the btrfs tree. 

Yes, we'll take it.

  reply	other threads:[~2024-08-13 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 16:30 [PATCH] btrfs: update target inode's ctime on unlink Jeff Layton
2024-08-12 16:42 ` David Sterba
2024-08-12 16:51   ` Jeff Layton
2024-08-13 13:00     ` David Sterba [this message]
2024-08-12 23:27 ` Qu Wenruo
2024-08-13 13:27 ` Christoph Hellwig

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=20240813130024.GP25962@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=bpf@vger.kernel.org \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jlayton@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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