From: Christoph Hellwig <hch@lst.de>
To: Jan Kara <jack@suse.cz>
Cc: "Andreas Gruenbacher" <agruenba@redhat.com>,
cluster-devel@redhat.com, "Christoph Hellwig" <hch@lst.de>,
"Bob Peterson" <rpeterso@redhat.com>,
"Dave Chinner" <david@fromorbit.com>,
"Ross Lagerwall" <ross.lagerwall@citrix.com>,
"Mark Syms" <Mark.Syms@citrix.com>,
"Edwin Török" <edvin.torok@citrix.com>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/2] iomap: Add a page_prepare callback
Date: Thu, 25 Apr 2019 17:03:40 +0200 [thread overview]
Message-ID: <20190425150340.GA17504@lst.de> (raw)
In-Reply-To: <20190425083252.GB21215@quack2.suse.cz>
On Thu, Apr 25, 2019 at 10:32:52AM +0200, Jan Kara wrote:
> Also just looking at the code I was wondering about the following. E.g. in
> iomap_write_end() we have code like:
>
> if (iomap->type == IOMAP_INLINE) {
> foo
> } else if (iomap->flags & IOMAP_F_BUFFER_HEAD) {
> bar
> } else {
> baz
> }
>
> if (iomap->page_done)
> iomap->page_done(...);
>
> And now something very similar is in iomap_write_begin(). So won't it be
> more natural to just mandate ->page_prepare() and ->page_done() callbacks
> and each filesystem would set it to a helper function it needs? Probably we
> could get rid of IOMAP_F_BUFFER_HEAD flag that way...
I don't want pointless indirect calls for the default, non-buffer
head case. Also inline really is a special case independent of
what the caller could pass in as flags or callbacks. We could try to
hide the buffer_head stuff in there, but then again I'd rather kill
that off sooner than later.
next prev parent reply other threads:[~2019-04-25 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 17:18 Andreas Gruenbacher
2019-04-24 17:18 ` [PATCH 2/2] gfs2: Fix iomap write page reclaim deadlock Andreas Gruenbacher
2019-04-25 7:59 ` [PATCH 1/2] iomap: Add a page_prepare callback Christoph Hellwig
2019-04-25 8:32 ` Jan Kara
2019-04-25 15:03 ` Christoph Hellwig [this message]
2019-04-25 15:26 ` Andreas Gruenbacher
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=20190425150340.GA17504@lst.de \
--to=hch@lst.de \
--cc=Mark.Syms@citrix.com \
--cc=agruenba@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=david@fromorbit.com \
--cc=edvin.torok@citrix.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ross.lagerwall@citrix.com \
--cc=rpeterso@redhat.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