From: Christoph Hellwig <hch@infradead.org>
To: Pavel Emelyanov <xemul@scylladb.com>
Cc: linux-fsdevel@vger.kernel.org,
"Raphael S . Carvalho" <raphaelsc@scylladb.com>,
linux-api@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] fs: Propagate FMODE_NOCMTIME flag to user-facing O_NOCMTIME
Date: Fri, 3 Oct 2025 21:26:50 -0700 [thread overview]
Message-ID: <aOCiCkFUOBWV_1yY@infradead.org> (raw)
In-Reply-To: <20251003093213.52624-1-xemul@scylladb.com>
On Fri, Oct 03, 2025 at 12:32:13PM +0300, Pavel Emelyanov wrote:
> The FMODE_NOCMTIME flag tells that ctime and mtime stamps are not
> updated on IO. The flag was introduced long ago by 4d4be482a4 ([XFS]
> add a FMODE flag to make XFS invisible I/O less hacky. Back then it
> was suggested that this flag is propagated to a O_NOCMTIME one.
skipping c/mtime is dangerous. The XFS handle code allows it to
support HSM where data is migrated out to tape, and requires
CAP_SYS_ADMIN. Allowing it for any file owner would expand the scope
for too much as now everyone could skip timestamp updates.
> It can be used by workloads that want to write a file but don't care
> much about the preciese timestamp on it and can update it later with
> utimens() call.
The workload might not care, the rest of the system does. ctime can't
bet set to arbitrary values, so it is important for backups and as
an audit trail.
> There's another reason for having this patch. When performing AIO write,
> the file_modified_flags() function checks whether or not to update inode
> times. In case update is needed and iocb carries the RWF_NOWAIT flag,
> the check return EINTR error that quickly propagates into cb completion
> without doing any IO. This restriction effectively prevents doing AIO
> writes with nowait flag, as file modifications really imply time update.
Well, we'll need to look into that, including maybe non-blockin
timestamp updates.
next parent reply other threads:[~2025-10-04 4:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251003093213.52624-1-xemul@scylladb.com>
2025-10-04 4:26 ` Christoph Hellwig [this message]
2025-10-04 16:08 ` [PATCH] fs: Propagate FMODE_NOCMTIME flag to user-facing O_NOCMTIME Andy Lutomirski
2025-10-07 5:08 ` Christoph Hellwig
2025-10-08 15:22 ` Andy Lutomirski
2025-10-08 21:27 ` Dave Chinner
2025-10-08 21:51 ` Andy Lutomirski
2025-10-11 1:35 ` Dave Chinner
2025-10-11 4:04 ` Andy Lutomirski
2025-10-10 5:27 ` Christoph Hellwig
2025-10-10 17:35 ` Andy Lutomirski
2025-10-05 22:06 ` Dave Chinner
2025-10-07 5:10 ` Christoph Hellwig
2025-10-05 23:38 ` Dave Chinner
2025-10-06 2:16 ` Theodore Ts'o
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=aOCiCkFUOBWV_1yY@infradead.org \
--to=hch@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=raphaelsc@scylladb.com \
--cc=xemul@scylladb.com \
/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;
as well as URLs for NNTP newsgroup(s).