From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
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 07:31:27 +0000 [thread overview]
Message-ID: <20201028073127.GA32068@infradead.org> (raw)
In-Reply-To: <20201026182019.1547662-1-bfoster@redhat.com>
> if (unlikely(error)) {
> + unsigned int pageoff = offset_in_page(file_offset);
> + /*
> + * Let the filesystem know what portion of the current page
> + * failed to map. If the page wasn't been added to ioend, it
> + * won't be affected by I/O completion and we must unlock it
> + * now.
> + */
> + if (wpc->ops->discard_page)
> + wpc->ops->discard_page(page, pageoff);
I don't think we need the pageoff variable here. Also it would
seem more natural to pass the full file_offset offset instead of
having to recreate it in the file system.
next prev parent reply other threads:[~2020-10-28 22:12 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 [this message]
2020-10-28 11:32 ` Brian Foster
2020-10-28 14:04 ` Christoph Hellwig
2020-10-28 14:15 ` Brian Foster
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=20201028073127.GA32068@infradead.org \
--to=hch@infradead.org \
--cc=bfoster@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).