From: Christoph Hellwig <hch@infradead.org>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/3] btrfs: return -EAGAIN for NOWAIT dio reads/writes on compressed and inline extents
Date: Mon, 4 Jul 2022 04:57:41 -0700 [thread overview]
Message-ID: <YsLVtZ+SpKOfiD5Z@infradead.org> (raw)
In-Reply-To: <b3864441547e49a69d45c7771aa8cc5e595d18fc.1656934419.git.fdmanana@suse.com>
On Mon, Jul 04, 2022 at 12:42:03PM +0100, fdmanana@kernel.org wrote:
> + * filemap_read(), we fail to fault in pages for the read buffer,
> + * in which case filemap_read() returns a short read (the number
> + * of bytes previously read is > 0, so it does not return -EFAULT).
Two overly long lines here, which are especially annoying in block
comments as they completely break the layout.
> + ret = (flags & IOMAP_NOWAIT) ? -EAGAIN : -ENOTBLK;
Nit: I'd find this a lot more readable with a good old if / else.
Either way the technical change looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2022-07-04 11:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 11:42 [PATCH 0/3] btrfs: a few direct IO fixes/improvements fdmanana
2022-07-04 11:42 ` [PATCH 1/3] btrfs: return -EAGAIN for NOWAIT dio reads/writes on compressed and inline extents fdmanana
2022-07-04 11:57 ` Christoph Hellwig [this message]
2022-07-07 16:47 ` David Sterba
2022-07-04 11:42 ` [PATCH 2/3] btrfs: don't fallback to buffered IO for NOWAIT direct IO writes fdmanana
2022-07-04 12:00 ` Christoph Hellwig
2022-07-04 12:11 ` Filipe Manana
2022-07-04 12:12 ` Christoph Hellwig
2022-07-04 12:19 ` Filipe Manana
2022-07-04 12:37 ` Christoph Hellwig
2022-07-04 11:42 ` [PATCH 3/3] btrfs: fault in pages for dio reads/writes in a more controlled way fdmanana
2022-07-08 15:20 ` [PATCH 0/3] btrfs: a few direct IO fixes/improvements David Sterba
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=YsLVtZ+SpKOfiD5Z@infradead.org \
--to=hch@infradead.org \
--cc=fdmanana@kernel.org \
--cc=linux-btrfs@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).