From: Christoph Hellwig <hch@lst.de>
To: Bob Peterson <rpeterso@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
linux-xfs@vger.kernel.org, axboe@fb.com,
kent overstreet <kent.overstreet@gmail.com>,
linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH 5/6] iomap: implement direct I/O
Date: Wed, 26 Oct 2016 16:02:30 +0200 [thread overview]
Message-ID: <20161026140230.GA8215@lst.de> (raw)
In-Reply-To: <1700618561.12920142.1477490023642.JavaMail.zimbra@redhat.com>
On Wed, Oct 26, 2016 at 09:53:43AM -0400, Bob Peterson wrote:
> It's unlikely, but bio_alloc can return NULL; shouldn't the code be
> checking for that?
No, a sleeping bio_alloc can not return NULL. If it did our I/O
code would break down badly - take a look at the implementation,
the bio_alloc_bioset documentation even explains this in detail.
> | + if (dio->error)
> | + return 0;
> | +
> | + bio = bio_alloc(GFP_KERNEL, nr_pages);
>
> Same here. Also: the code that follows is nearly identical; do you want to make
> it a macro or inline function or something?
I'll take a look, but having another helper needed to follow for a
trivial struct initialization doesn't seem all that useful.
next prev parent reply other threads:[~2016-10-26 14:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 15:08 Christoph Hellwig
2016-10-25 15:08 ` [PATCH 1/6] locking/lockdep: Provide a type check for lock_is_held Christoph Hellwig
2016-10-25 15:08 ` [PATCH 2/6] xfs: remove i_iolock and use i_rwsem in the VFS inode instead Christoph Hellwig
2016-10-25 15:08 ` [PATCH 3/6] block: add bio_iov_iter_get_pages() Christoph Hellwig
2016-10-25 15:08 ` [PATCH 4/6] fs: make sb_init_dio_done_wq available outside of direct-io.c Christoph Hellwig
2016-10-25 15:08 ` [PATCH 5/6] iomap: implement direct I/O Christoph Hellwig
2016-10-25 15:31 ` Kent Overstreet
2016-10-25 16:34 ` Christoph Hellwig
2016-10-25 17:13 ` Kent Overstreet
2016-10-26 7:44 ` Christoph Hellwig
2016-10-25 19:51 ` Kent Overstreet
2016-10-26 7:57 ` Christoph Hellwig
2016-10-26 13:53 ` Bob Peterson
2016-10-26 14:02 ` Christoph Hellwig [this message]
2016-10-25 15:08 ` [PATCH 6/6] xfs: use iomap_dio_rw Christoph Hellwig
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=20161026140230.GA8215@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=kent.overstreet@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).