All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Lyu <tao.lyu@epfl.ch>
To: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Question about O_APPEND | O_DIRECT
Date: Thu, 23 Nov 2023 18:14:51 +0000	[thread overview]
Message-ID: <c609e5f9df75438dbfe3810859935d58@epfl.ch> (raw)

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



             reply	other threads:[~2023-11-23 18:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23 18:14 Tao Lyu [this message]
2023-11-25 23:54 ` Question about O_APPEND | O_DIRECT 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

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=c609e5f9df75438dbfe3810859935d58@epfl.ch \
    --to=tao.lyu@epfl.ch \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.