linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: mawilcox@microsoft.com,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] fs: dax: Adding new return type vm_fault_t
Date: Fri, 20 Apr 2018 13:47:51 -0700	[thread overview]
Message-ID: <20180420204751.GG10788@bombadil.infradead.org> (raw)
In-Reply-To: <CAFqt6zZppm-KnLPmF0YCjBWUqWuoewZtzJfN7mu+zr4dPEUmqw@mail.gmail.com>

On Sat, Apr 21, 2018 at 12:51:44AM +0530, Souptick Joarder wrote:
> On Wed, Apr 18, 2018 at 2:30 AM, Matthew Wilcox <willy@infradead.org> wrote:
> > On Tue, Apr 17, 2018 at 09:05:07PM +0530, Souptick Joarder wrote:
> >> There was an existing bug inside dax_load_hole()
> >> if vm_insert_mixed had failed to allocate a page table,
> >> we'd return VM_FAULT_NOPAGE instead of VM_FAULT_OOM.
> >> With vmf_insert_mixed this issue is addressed.
> >>
> >> vmf_insert_mixed_mkwrite() is the new wrapper function
> >> which will convert err returned from vm_insert_mixed_
> >> mkwrite() to vm_fault_t type.
> >
> > Since dax is the only caller of vm_insert_mixed_mkwrite(), rather
> > than introducing a wrapper function, you should just convert
> > vm_insert_mixed_mkwrite() to vmf_insert_mixed_mkwrite().
> >
> 
> Although vm_insert_mixed_mkwrite () is getting called only from dax,
> but if we directly change it to vmf_insert_mixed_mkwrite()
> with return type vm_fault_t, we end with changing multiple functions
> recursively. In my opinion, it will complicate things.
> 
> It's better to go with current inline vmf_insert_mixed_mkwrite() approach.

No, it's not.  The point is to create patches which are self-contained
and don't break anything.  So we can't change vm_insert_mixed because
it has so many users, and we need to transition to it gradually.
But vm_insert_mixed_mkwrite only has one user, and we can just change
both at the same time.

  reply	other threads:[~2018-04-20 20:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 15:35 [PATCH] fs: dax: Adding new return type vm_fault_t Souptick Joarder
2018-04-17 20:26 ` Ross Zwisler
2018-04-17 21:00 ` Matthew Wilcox
2018-04-20 19:21   ` Souptick Joarder
2018-04-20 20:47     ` Matthew Wilcox [this message]
2018-04-21 17:26       ` Souptick Joarder
2018-04-18  9:02 ` kbuild test robot
2018-04-18  9:18 ` kbuild test robot
2018-04-18 11:38   ` Souptick Joarder
2018-04-18 12:13     ` Fengguang Wu
2018-04-18 15:41       ` Ross Zwisler

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=20180420204751.GG10788@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mawilcox@microsoft.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).