From: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Dan Shelton <dan.f.shelton@gmail.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
ms-nfs41-client-devel@lists.sourceforge.net
Subject: Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
Date: Thu, 25 Jul 2024 22:34:36 +0200 (CEST) [thread overview]
Message-ID: <814701891.39673338.1721939676245.JavaMail.zimbra@desy.de> (raw)
In-Reply-To: <9D5914C6-BF08-4063-BCC7-C2F7458F33EC@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 4746 bytes --]
----- Original Message -----
> From: "Chuck Lever III" <chuck.lever@oracle.com>
> To: "Dan Shelton" <dan.f.shelton@gmail.com>
> Cc: "Linux NFS Mailing List" <linux-nfs@vger.kernel.org>, ms-nfs41-client-devel@lists.sourceforge.net
> Sent: Thursday, 25 July, 2024 18:10:18
> Subject: Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
>> On Jul 23, 2024, at 7:05 PM, Dan Shelton <dan.f.shelton@gmail.com> wrote:
>>
>> On Tue, 23 Jul 2024 at 15:58, Olga Kornievskaia <aglo@umich.edu> wrote:
>>>
>>> On Tue, Jul 23, 2024 at 9:17 AM Roland Mainz <roland.mainz@nrubsig.org> wrote:
>>>>
>>>> Hi!
>>>>
>>>> ----
>>>>
>>>> [2nd attempt to send this email]
>>>> The Win32 API has |FILE_ATTRIBUTE_TEMPORARY| (see
>>>> https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea)
>>>> to optimise for short-lived/small temporary files - would it be useful
>>>> to reflect that in the NFSv4.2 protocol via a |FATTR4_TMPFILE|
>>>> attribute (sort of the opposite of |FATTR4_OFFLINE|, such a
>>>> |FATTR4_TMPFILE| should be ignored by HSM, and flushing to stable
>>>> storage should be relaxed/delayed as long as possible) ?
>>>
>>> I think a more appropriate medium for this message is an IETF NFSv4
>>> mailing list
>>
>> Where is that list?
>
> <nfsv4@ietf.org> is publicly archived, but you have to join to
> post because all posts to that list are treated as contributions
> to the IETF.
Indeed, we are touching on the IETF area of responsibility.
>
>
>>> as FATTR4_TMPFILE is not a spec attribute.
>>
>> I think the question was what the Linux nfsd people think about such
>> an attribute.
>>
>> But I also have a related question: Can the Linux nfsv4 client code
>> see the O_TMPFILE flag from openat() syscalls? If that is the case,
>> then O_TMPFILE ----> {FATTR4_TMPFILE, true}, and Linux nfsd can
>> optimise such files too.
>
> O_TMPFILE is a little different. open(2) says:
>
> O_TMPFILE (since Linux 3.11)
> Create an unnamed temporary regular file. The pathname
> argument specifies a directory; an unnamed inode will be
> created in that directory's filesystem. Anything written
> to the resulting file will be lost when the last file
> descriptor is closed, unless the file is given a name.
>
> That doesn't seem to be quite the same thing as "create a named
> file but request that the server's HSM to ignore it".
>
> Also: an O_ flag is a declaration of an application's intended
> use. A file attribute is persistent across opens. O_TMPFILE might
> apply to writeback style, but it doesn't seem consistent with
> how one might prefer to set HSM policy on a persistent file.
>
> There was a recent (but now expired) personal draft that proposed
> adding some fattr4 attributes that enabled clients to control the
> HSM properties of a file. It didn't get a lot of working group
> traction.
>
> IMO generally the NFS protocol is about application access to
> file data; administrative operations like HSM policy are left to
> the NFS server and its local storage. You could certainly invent
> an RPC protocol (outside of NFS but using NFS file handles) that
> could be used to set HSM policy remotely (and, of course,
> securely).
>
> Wearing my NFSD maintainer cap: Again it is a matter of whether
> there are local file systems on Linux that can store and/or
> make use of such attributes. I'm not aware of a current statx()
> API for controlling HSM policy, but I'm not expert in that area.
> (That doesn't mean there aren't other NFS server implementations
> that could indeed make use of such an attribute).
As a server implementor with an HSM behind. The tape system needs
many other attributes, like family, priority, media type,
number of copies... A generic QoS attribute that can control
storage system behavior probably makes sense. And then we have
POSIX that doesn't expose it, and user applications that don't
care. But, again, this is an IETF discussion.
Best regards,
Tigran.
>
> As far as delaying data persistence, the client can already
> signal to the server that it doesn't care much about a file's
> content by simply not sending WRITEs or a COMMIT. Sending a
> CLOSE can be preceded by SETATTR(size=0) to ensure any already-
> written data is tossed.
>
> It feels to me like the client has some control here already,
> which is why I suggested that a proof-of-concept would be a
> useful way to explore the idea and nail down the desired
> semantics before making a full proposal to change the protocol
> standard.
>
>
> --
> Chuck Lever
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2826 bytes --]
next prev parent reply other threads:[~2024-07-25 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 13:16 New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ? Roland Mainz
2024-07-23 13:58 ` Olga Kornievskaia
2024-07-23 23:05 ` Dan Shelton
2024-07-25 16:10 ` Chuck Lever III
2024-07-25 20:34 ` Mkrtchyan, Tigran [this message]
2024-07-24 15:15 ` Chuck Lever III
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=814701891.39673338.1721939676245.JavaMail.zimbra@desy.de \
--to=tigran.mkrtchyan@desy.de \
--cc=chuck.lever@oracle.com \
--cc=dan.f.shelton@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=ms-nfs41-client-devel@lists.sourceforge.net \
/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