* New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
@ 2024-07-23 13:16 Roland Mainz
2024-07-23 13:58 ` Olga Kornievskaia
2024-07-24 15:15 ` Chuck Lever III
0 siblings, 2 replies; 6+ messages in thread
From: Roland Mainz @ 2024-07-23 13:16 UTC (permalink / raw)
To: Linux NFS Mailing List, ms-nfs41-client-devel
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) ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
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-24 15:15 ` Chuck Lever III
1 sibling, 1 reply; 6+ messages in thread
From: Olga Kornievskaia @ 2024-07-23 13:58 UTC (permalink / raw)
To: gisburn; +Cc: Linux NFS Mailing List, ms-nfs41-client-devel
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 as FATTR4_TMPFILE is not a spec attribute.
>
> ----
>
> Bye,
> Roland
> --
> __ . . __
> (o.\ \/ /.o) roland.mainz@nrubsig.org
> \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
> /O /==\ O\ TEL +49 641 3992797
> (;O/ \/ \O;)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
2024-07-23 13:58 ` Olga Kornievskaia
@ 2024-07-23 23:05 ` Dan Shelton
2024-07-25 16:10 ` Chuck Lever III
0 siblings, 1 reply; 6+ messages in thread
From: Dan Shelton @ 2024-07-23 23:05 UTC (permalink / raw)
To: Linux NFS Mailing List, ms-nfs41-client-devel
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?
> 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.
Dan
--
Dan Shelton - Cluster Specialist Win/Lin/Bsd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
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-24 15:15 ` Chuck Lever III
1 sibling, 0 replies; 6+ messages in thread
From: Chuck Lever III @ 2024-07-24 15:15 UTC (permalink / raw)
To: gisburn@nrubsig.org
Cc: Linux NFS Mailing List,
ms-nfs41-client-devel@lists.sourceforge.net
> On Jul 23, 2024, at 9:16 AM, Roland Mainz <roland.mainz@nrubsig.org> wrote:
>
> 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) ?
Well, I might start with the client side. The client could
avoid flushing data back to the server in this case, and
the server (and protocol) wouldn't have to know about the
file's temporary status.
I'm not aware of a system call API on POSIX NFS clients
that might enable them to use such a protocol feature.
One idea might be to use fadvise(2)... ? So because this
might be a feature only for clients that support the
CreateFileA API, prototyping it on such clients might be
a good place to demonstrate value.
--
Chuck Lever
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
2024-07-23 23:05 ` Dan Shelton
@ 2024-07-25 16:10 ` Chuck Lever III
2024-07-25 20:34 ` Mkrtchyan, Tigran
0 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever III @ 2024-07-25 16:10 UTC (permalink / raw)
To: Dan Shelton
Cc: Linux NFS Mailing List,
ms-nfs41-client-devel@lists.sourceforge.net
> 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.
>> 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 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New NFSv4.2 attribute |FATTR4_TMPFILE| (sort of opposite of |FATTR4_OFFLINE|) ?
2024-07-25 16:10 ` Chuck Lever III
@ 2024-07-25 20:34 ` Mkrtchyan, Tigran
0 siblings, 0 replies; 6+ messages in thread
From: Mkrtchyan, Tigran @ 2024-07-25 20:34 UTC (permalink / raw)
To: Chuck Lever III
Cc: Dan Shelton, Linux NFS Mailing List, ms-nfs41-client-devel
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-07-25 20:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-07-24 15:15 ` Chuck Lever III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox