From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: bcrl@kvack.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] aio: remove 'always false' check
Date: Fri, 13 Jul 2012 09:35:31 +0800 [thread overview]
Message-ID: <20120713013531.GA12818@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <x49txxeidqh.fsf@segfault.boston.devel.redhat.com>
Hi Jeff,
On Wed, Jul 11, 2012 at 10:17:26AM -0400, Jeff Moyer wrote:
> Yuanhan Liu <yuanhan.liu@linux.intel.com> writes:
>
> > The only case that nr_pages will be < 0 is that nr_pages overflowed due
> > to nr_events is too big. But it is exclued at ioctx_alloc().
>
> Right, the number of events is limited to what will fit in 256MB, for
> some odd reason. Maybe Ben can comment on that.
>
> > Thus, nr_pages will always > 0. So remove the dead 'if (nr_pages < 0)'
> > code block.
>
> Sure, but I don't see any harm in keeping this check. We do add another
> page to the size,
That would change nothing :)
> so retesting for overflow is good practice, and isn't
> going to kill performance.
>
> So, I'm going to NAK this.
I'm fine with this NAK. And, thanks for your comments.
prev parent reply other threads:[~2012-07-13 1:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 9:15 [PATCH] aio: remove 'always false' check Yuanhan Liu
2012-07-11 14:17 ` Jeff Moyer
2012-07-13 1:35 ` Yuanhan Liu [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=20120713013531.GA12818@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=bcrl@kvack.org \
--cc=jmoyer@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).