public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] iomap: support partial page discard on writeback block mapping failure
Date: Wed, 28 Oct 2020 10:15:59 -0400	[thread overview]
Message-ID: <20201028141559.GB1611922@bfoster> (raw)
In-Reply-To: <20201028140408.GA7841@infradead.org>

On Wed, Oct 28, 2020 at 02:04:08PM +0000, Christoph Hellwig wrote:
> On Wed, Oct 28, 2020 at 07:32:00AM -0400, Brian Foster wrote:
> > I used the variable just to avoid having to split the function call into
> > multiple lines. I.e., it just looked more readable to me than:
> > 
> >                if (wpc->ops->discard_page)
> >                         wpc->ops->discard_page(page,
> >                                                offset_in_page(file_offset));
> > 
> > I can change it back if that is preferred (or possibly use a function
> > pointer variable instead). I suppose that's also avoided by passing
> > file_offset directly, but that seems a little odd to me for a page
> > oriented callback.
> 
> I think passing the file offset makes more sense, especially as the
> only instance needs it anyway.
> 

The callback uses both, but I'm not tied to it either way. I'll make
that tweak for the next version..

Brian


      reply	other threads:[~2020-10-29  0:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 18:20 [PATCH] iomap: support partial page discard on writeback block mapping failure Brian Foster
2020-10-27 16:47 ` Brian Foster
2020-10-28  7:31 ` Christoph Hellwig
2020-10-28 11:32   ` Brian Foster
2020-10-28 14:04     ` Christoph Hellwig
2020-10-28 14:15       ` Brian Foster [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=20201028141559.GB1611922@bfoster \
    --to=bfoster@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox