The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <slava@dubeyko.com>
To: 李扬韬 <frank.li@vivo.com>,
	"Viacheslav Dubeyko" <Slava.Dubeyko@ibm.com>,
	"glaubitz@physik.fu-berlin.de" <glaubitz@physik.fu-berlin.de>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 回复:  [PATCH 2/2] hfs: fix to update ctime after rename
Date: Fri, 09 May 2025 12:02:29 -0700	[thread overview]
Message-ID: <d83f9ef1820c52004ce82ce69e58333ba83af85d.camel@dubeyko.com> (raw)
In-Reply-To: <c19db3b68063cd361c475aaebdd95a232aef710c.camel@dubeyko.com>

On Fri, 2025-05-09 at 10:51 -0700, Viacheslav Dubeyko wrote:
> On Wed, 2025-05-07 at 14:22 +0000, 李扬韬 wrote:
> > Hi Slava,
> > 
> > >    +ERROR: access time has changed for file1 after remount
> > >    +ERROR: access time has changed after modifying file1
> > >    +ERROR: access time has changed for file in read-only
> > > filesystem
> > 
> > > It looks like that it is not the whole fix of the issue for HFS
> > > case.
> > 
> > The test cases that failed after applying this patch are all
> > related
> > to the atime not being updated,
> 
> If I understood correctly "ERROR: access time has changed for file1
> after remount" means atime has been changed.
> 
> > but hfs actually does not have atime. 
> > 
> 
> But how the test detects that atime has been updated? If HFS hasn't
> atime, then test cannot detect such update, from my point of view.
> 

As far as I can see, HFS code operates by atime [1 - 3]. As a result,
generic_fillattr [4] can retrieve the atime value. If we don't store
atime in the on-disk metadata, then the test could see inconsistent
atime value. I believe that dirMdDat/filMdDat (mtime) needs to be
considered as atime too. Because, modification cannot be done without
access action. So, atime == mtime.

Thanks,
Slava.

> > So the current fix is ​​sufficient, should we modify the 003 test
> > case?
> > 
> 
> I don't think so. Probably, something is wrong in HFS code. We need
> to
> double check it.
> 
> Thanks,
> Slava.
> 
> >    dirCrDat:      LongInt;    {date and time of creation}
> >    dirMdDat:      LongInt;    {date and time of last modification}
> >    dirBkDat:      LongInt;    {date and time of last backup}
> > 
> >    filCrDat:      LongInt;    {date and time of creation}
> >    filMdDat:      LongInt;    {date and time of last modification}
> >    filBkDat:      LongInt;    {date and time of last backup}
> > 
> > Thanks,
> > Yangtao

[1] https://elixir.bootlin.com/linux/v6.12.6/source/fs/hfs/sysdep.c#L35
[2] https://elixir.bootlin.com/linux/v6.12.6/source/fs/hfs/inode.c#L356
[3] https://elixir.bootlin.com/linux/v6.12.6/source/fs/hfs/inode.c#L367
[4] https://elixir.bootlin.com/linux/v6.12.6/source/fs/stat.c#L60

  reply	other threads:[~2025-05-09 19:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 20:15 [PATCH 1/2] hfsplus: fix to update ctime after rename Yangtao Li
2025-04-29 20:15 ` [PATCH 2/2] hfs: " Yangtao Li
2025-04-29 21:31   ` Viacheslav Dubeyko
2025-05-02  0:03   ` Viacheslav Dubeyko
2025-05-07 14:22     ` 回复: " 李扬韬
2025-05-09 17:51       ` Viacheslav Dubeyko
2025-05-09 19:02         ` Viacheslav Dubeyko [this message]
2025-05-10  5:31         ` 回复: " 李扬韬
2025-05-15  1:10           ` Viacheslav Dubeyko
2025-04-29 21:27 ` [PATCH 1/2] hfsplus: " Viacheslav Dubeyko
2025-05-01 12:01   ` 回复: " 李扬韬
2025-05-01 18:57     ` Viacheslav Dubeyko
2025-05-01 19:10       ` John Paul Adrian Glaubitz
2025-05-01 19:48         ` Viacheslav Dubeyko
2025-05-02 12:52           ` Theodore Ts'o
2025-05-05 22:31             ` Viacheslav Dubeyko
2025-05-02  0:07 ` Viacheslav Dubeyko

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=d83f9ef1820c52004ce82ce69e58333ba83af85d.camel@dubeyko.com \
    --to=slava@dubeyko.com \
    --cc=Slava.Dubeyko@ibm.com \
    --cc=frank.li@vivo.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-fsdevel@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