From: Amir Goldstein <amir73il@gmail.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
richard.sharpe@primarydata.com,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
lance.shelton@hammerspace.com,
Anna Schumaker <Anna.Schumaker@netapp.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux API <linux-api@vger.kernel.org>,
CIFS <linux-cifs@vger.kernel.org>,
ntfs3@lists.linux.dev, Steve French <sfrench@samba.org>,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
Ralph Boehme <slow@samba.org>
Subject: Re: [bug report] NFS: Support statx_get and statx_set ioctls
Date: Thu, 13 Jan 2022 05:52:40 +0200 [thread overview]
Message-ID: <CAOQ4uxh7wpxx2H6Vpm26OdigXbWCCLO1xbFapupvLCn8xOiL=w@mail.gmail.com> (raw)
In-Reply-To: <20220112174301.GB19154@magnolia>
> > Which leaves us with an API to set the 'time backup' attribute, which
> > is a "mutable creation time" [*].
> > cifs supports setting it via setxattr and I guess ntfs3 could use an
> > API to set it as well.
> >
> > One natural interface that comes to mind is:
> >
> > struct timespec times[3] = {/* atime, mtime, crtime */}
> > utimensat(dirfd, path, times, AT_UTIMES_ARCHIVE);
> >
> > and add ia_crtime with ATTR_CRTIME to struct iattr.
> >
> > Trond,
> >
> > Do you agree to rework your patches in this direction?
> > Perhaps as the first stage, just use statx() and ioctls to set the
> > attributes to give enough time for bikeshedding the set APIs
> > and follow up with the generic set API patches later?
> >
> > Thanks,
> > Amir.
> >
> > [*] I find it convenient to use the statx() terminology of "btime"
> > to refer to the immutable birth time provided by some filesystems
> > and to use "crtime" for the mutable creation time for archiving,
> > so that at some point, some filesystems may provide both of
> > these times independently.
>
> I disagree because XFS and ext4 both use 'crtime' for the immutable
> birth time, not a mutable creation time for archiving. I think we'd
> need to be careful about wording here if there is interest in adding a
> user-modifiable file creation time (as opposed to creation time for a
> specific instance of an inode) to filesystems.
>
> Once a year or so we get a question/complaint from a user about how they
> can't change the file creation time and we have to explain to them
> what's really going on.
>
To add one more terminology to the mix - when Samba needed to cope
with these two terminologies they came up with itime for "instantiation time"
(one may also consider it "immutable time").
Another issue besides wording, is that statx btime can be either of those
things depending on the filesystem, so if we ever add mutable btime to
ext4/xfs, what's statx btime going to return?
One more question to ask, if we were to add mutable btime to ext4/xfs
should it be an additional attribute at all or should we allow with explicit
filesystem flag and maybe also mount option to modify the existing crtime
inode field? if we can accept that some users are willing to trade the
immutable crtime with mutable btime, then we can settle with a flag
indicating "warranty seal removed" from the existing crtime field.
At least one advantage of this approach is that it simplifies terminology.
Thanks,
Amir.
next prev parent reply other threads:[~2022-01-13 3:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220111074309.GA12918@kili>
[not found] ` <Yd1ETmx/HCigOrzl@infradead.org>
2022-01-12 7:57 ` [bug report] NFS: Support statx_get and statx_set ioctls Amir Goldstein
2022-01-12 17:43 ` Darrick J. Wong
2022-01-13 3:52 ` Amir Goldstein [this message]
2022-01-13 6:30 ` Jeremy Allison
2022-01-13 14:58 ` Trond Myklebust
2022-01-13 17:50 ` Jeremy Allison
2022-01-13 15:01 ` Trond Myklebust
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='CAOQ4uxh7wpxx2H6Vpm26OdigXbWCCLO1xbFapupvLCn8xOiL=w@mail.gmail.com' \
--to=amir73il@gmail.com \
--cc=Anna.Schumaker@netapp.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=dan.carpenter@oracle.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=lance.shelton@hammerspace.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--cc=richard.sharpe@primarydata.com \
--cc=sfrench@samba.org \
--cc=slow@samba.org \
--cc=trond.myklebust@hammerspace.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).