Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> From: "Chuck Lever III" <chuck.lever@xxxxxxxxxx>
> To: "Dan Shelton" <dan.f.shelton@xxxxxxxxx>
> Cc: "Linux NFS Mailing List" <linux-nfs@xxxxxxxxxxxxxxx>, ms-nfs41-client-devel@xxxxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxx> wrote:
>> 
>> On Tue, 23 Jul 2024 at 15:58, Olga Kornievskaia <aglo@xxxxxxxxx> wrote:
>>> 
>>> On Tue, Jul 23, 2024 at 9:17 AM Roland Mainz <roland.mainz@xxxxxxxxxxx> 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@xxxxxxxx> 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: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux