Linux NFS development
 help / color / mirror / Atom feed
* Question about O_APPEND | O_DIRECT
@ 2023-11-23 18:14 Tao Lyu
  2023-11-25 23:54 ` Trond Myklebust
  0 siblings, 1 reply; 15+ messages in thread
From: Tao Lyu @ 2023-11-23 18:14 UTC (permalink / raw)
  To: linux-nfs@vger.kernel.org

Hi,

Sorry to bother you here.

I'm using NFS and realize it doesn't support opening a file with "O_DIRECT | O_APPEND".

After checking the source code, 
I found it has one function that checks explicitly whether there is a combination flag of "O_APPEND | O_DIRECT".
If so, it will return invalid arguments.

int nfs_check_flags(int flags)
{
    if ((flags & (O_APPEND | O_DIRECT)) == (O_APPEND | O_DIRECT))
        return -EINVAL;

    return 0;
}

But I don't understand why NFS doesn't support this flag combination.
I'd appreciate it if someone could explain this to me.

Thanks in advance.

Best,
Tao



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-11-28 18:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-23 18:14 Question about O_APPEND | O_DIRECT Tao Lyu
2023-11-25 23:54 ` Trond Myklebust
2023-11-27 15:28   ` Tao Lyu
2023-11-27 16:36     ` Christoph Hellwig
2023-11-27 16:41       ` Tao Lyu
2023-11-27 16:50       ` Chuck Lever III
2023-11-27 16:55         ` Christoph Hellwig
2023-11-27 16:59           ` Chuck Lever III
2023-11-28 13:06             ` Christoph Hellwig
2023-11-28  1:50         ` Rick Macklem
2023-11-28 13:09           ` Christoph Hellwig
2023-11-28 18:28             ` Trond Myklebust
2023-11-27 17:08       ` Trond Myklebust
2023-11-27 17:19         ` hch
2023-11-27 17:23           ` Tao Lyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox