From: Benny Halevy <bhalevy.lists@gmail.com>
To: Fred Isaman <iisaman@netapp.com>
Cc: linux-nfs@vger.kernel.org, Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: Re: [PATCH 1/1] nfs4.1: pnfs_find_lseg only looks at first element in list
Date: Tue, 14 Jun 2011 10:38:12 -0400 [thread overview]
Message-ID: <4DF77254.2090608@gmail.com> (raw)
In-Reply-To: <1308059788-17381-1-git-send-email-iisaman@netapp.com>
On 2011-06-14 09:56, Fred Isaman wrote:
> The break condition to skip out of the loop if we've gone too far was
> reversed, causing the function to abort after looking at the first
> list entry.
>
> Reported-by: Peng Tao <peng_tao@emc.com>
> Signed-off-by: Fred Isaman <iisaman@netapp.com>
> ---
> fs/nfs/pnfs.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index 1abb300..c640f91 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -895,7 +895,7 @@ pnfs_find_lseg(struct pnfs_layout_hdr *lo,
> ret = get_lseg(lseg);
> break;
> }
> - if (cmp_layout(range, &lseg->pls_range) > 0)
> + if (cmp_layout(range, &lseg->pls_range) < 0)
Fred, this is too harsh since we might break if range->offset == lseg->pls_range.offset
&& range->length > lseg->pls_range.length.
The simplest condition is just:
if (lseg->pls_range.offset > range->offset)
Benny
> break;
> }
>
next prev parent reply other threads:[~2011-06-14 14:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 13:56 [PATCH 1/1] nfs4.1: pnfs_find_lseg only looks at first element in list Fred Isaman
2011-06-14 14:38 ` Benny Halevy [this message]
2011-06-14 20:30 ` [PATCH] NFSv4.1: fix break condition in pnfs_find_lseg Benny Halevy
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=4DF77254.2090608@gmail.com \
--to=bhalevy.lists@gmail.com \
--cc=Trond.Myklebust@netapp.com \
--cc=iisaman@netapp.com \
--cc=linux-nfs@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).