From: Christoph Hellwig <hch@infradead.org>
To: Peng Tao <tao.peng@primarydata.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Trond Myklebust <trond.myklebust@primarydata.com>
Subject: Re: [PATCH] nfs: fix dio deadlock when O_DIRECT flag is flipped
Date: Thu, 15 Jan 2015 07:17:28 -0800 [thread overview]
Message-ID: <20150115151728.GA10932@infradead.org> (raw)
In-Reply-To: <CAKVebiUx+WMku--vyRC5h6-8vZ27vOoqVVyfpEmwztJaqvAx9g@mail.gmail.com>
On Thu, Jan 15, 2015 at 12:55:35AM +0800, Peng Tao wrote:
> > The right fix is to determine the O_DIRECT flag in one place when
> > entering a write, and then pass it down on the stack. We already do
> > this in XFS for example, it just needs to be expanded to filemap.c
> > so that more filesystems benefit from it.
> NFS hijacks DIO in ->write_iter by checking O_DIRECT flag and rely on
> generic_file_write_iter() for buffer write. generic_file_write_iter()
> again checks for O_DIRECT flag.... It seems that we can avoid the
> double check on O_DIRECT flag by calling generic_perform_write()
> instead.
Yes, that sounds like the simplest version for now.
prev parent reply other threads:[~2015-01-15 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 14:09 [PATCH] nfs: fix dio deadlock when O_DIRECT flag is flipped Peng Tao
2015-01-14 15:48 ` Christoph Hellwig
[not found] ` <CAHQdGtQAqn9zh8UC-dn2s3nLmnRyyxeSNdk=+FZdYmj46ZEcXA@mail.gmail.com>
2015-01-14 16:21 ` Trond Myklebust
2015-01-14 16:55 ` Peng Tao
2015-01-15 15:17 ` Christoph Hellwig [this message]
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=20150115151728.GA10932@infradead.org \
--to=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
--cc=tao.peng@primarydata.com \
--cc=trond.myklebust@primarydata.com \
/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