From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Luca Di Maio <luca.dimaio1@gmail.com>,
linux-xfs@vger.kernel.org, dimitri.ledkov@chainguard.dev,
smoser@chainguard.dev
Subject: Re: [PATCH v6 2/4] populate: add ability to populate a filesystem from a directory
Date: Fri, 25 Apr 2025 08:00:55 -0700 [thread overview]
Message-ID: <20250425150055.GM25675@frogsfrogsfrogs> (raw)
In-Reply-To: <aAuJtnJQXOlZ6LLi@infradead.org>
On Fri, Apr 25, 2025 at 06:10:14AM -0700, Christoph Hellwig wrote:
> On Thu, Apr 24, 2025 at 03:00:41PM -0700, Darrick J. Wong wrote:
> > The thing is, if you were relying on atime/mtime for detection of "file
> > data changed since last read" then /not/ copying atime into the
> > filesystem breaks that property in the image.
>
> I don't think that matter for images, because no software will keep
> running over the upgrade of the image. Also plenty of people run
> with noatime, and btrfs even defaulted to it for a while (not sure if
> it still does).
>
> At the same time having the same behavior as mkfs.ext4 is a good thing
> by itself because people obviously have been using it and consistency
> is always a good thing.
I don't see where mke2fs -d actually copies i_mtime into the filesystem.
In misc/create_inode.c I see a lot of:
now = fs->now ? fs->now : time(0);
ext2fs_inode_xtime_set(&inode, i_atime, now);
ext2fs_inode_xtime_set(&inode, i_ctime, now);
ext2fs_inode_xtime_set(&inode, i_mtime, now);
which implies that all three are set to a predetermined timestamp or the
current timestamp.
Also while I'm scanning create_inode.c, do you want to preserve
hardlinks?
> > How about copying [acm]time from the source file by default, but then
> > add a new -p noatime option to skip the atime?
>
> I'd probably invert the polarity. When building an image keeping
> atime especially and also ctime is usually not very useful. But that
> would give folks who need it for some reason a way to do so.
Either's fine with me.
--D
next prev parent reply other threads:[~2025-04-25 15:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 16:03 [PATCH v6 0/4] mkfs: add ability to populate filesystem from directory Luca Di Maio
2025-04-23 16:03 ` [PATCH v6 1/4] proto: expose more functions from proto Luca Di Maio
2025-04-23 16:03 ` [PATCH v6 2/4] populate: add ability to populate a filesystem from a directory Luca Di Maio
2025-04-23 20:23 ` Darrick J. Wong
2025-04-24 16:09 ` Luca Di Maio
2025-04-24 22:00 ` Darrick J. Wong
2025-04-25 13:10 ` Christoph Hellwig
2025-04-25 15:00 ` Darrick J. Wong [this message]
2025-04-25 17:58 ` Luca Di Maio
2025-04-23 16:03 ` [PATCH v6 3/4] mkfs: add -P flag " Luca Di Maio
2025-04-23 20:09 ` Darrick J. Wong
2025-04-24 12:01 ` Luca Di Maio
2025-04-24 21:55 ` Darrick J. Wong
2025-04-23 16:03 ` [PATCH v6 4/4] man: document " Luca Di Maio
2025-04-23 20:03 ` [PATCH v6 0/4] mkfs: add ability to populate filesystem from directory Darrick J. Wong
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=20250425150055.GM25675@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=dimitri.ledkov@chainguard.dev \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=luca.dimaio1@gmail.com \
--cc=smoser@chainguard.dev \
/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