From: Boaz Harrosh <bharrosh@panasas.com>
To: Fred Isaman <iisaman@netapp.com>
Cc: <linux-nfs@vger.kernel.org>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
"Matt W. Benjamin" <matt@linuxbox.com>,
"Adam C. Emerson" <aemerson@linuxbox.com>
Subject: Re: [PATCH 1/1] Prevent 3.0 from crashing if it receives a partial layout
Date: Wed, 21 Sep 2011 12:51:23 +0300 [thread overview]
Message-ID: <4E79B39B.1080102@panasas.com> (raw)
In-Reply-To: <1316544755-31845-1-git-send-email-iisaman@netapp.com>
On 09/20/2011 09:52 PM, Fred Isaman wrote:
> This is a backport of critical parts of
> commit 7c24d9489f "NFSv4.1: File layout only supports whole file layouts"
>
> It prevents the file layout driver from (incorrectly) using
> partial layouts, but ignores the part of the referenced commmit that
> relies on additional machinery to change the LAYOUTGET request
> based on layout driver.
>
> Signed-off-by: Fred Isaman <iisaman@netapp.com>
Hi Fred
Do you know of any plans/timetables to support segments in the files-layout-driver?
Both objects and blocks do support it.
Is there some missing generic infrastructure needed or its only LD stuff?
Just that I know of a few files-based servers that can only serve segments
and are unusable with current Linux-pNFS-client which is a great pity.
I wish it could be ready for next BAT
Thanks
Boaz
> ---
> fs/nfs/nfs4filelayout.c | 8 ++++++++
> fs/nfs/pnfs.c | 3 ++-
> 2 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
> index 614c4d2..75af812 100644
> --- a/fs/nfs/nfs4filelayout.c
> +++ b/fs/nfs/nfs4filelayout.c
> @@ -428,6 +428,14 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo,
>
> dprintk("--> %s\n", __func__);
>
> + /* FIXME: remove this check when layout segment support is added */
> + if (lgr->range.offset != 0 ||
> + lgr->range.length != NFS4_MAX_UINT64) {
> + dprintk("%s Only whole file layouts supported. Use MDS i/o\n",
> + __func__);
> + goto out;
> + }
> +
> if (fl->pattern_offset > lgr->range.offset) {
> dprintk("%s pattern_offset %lld too large\n",
> __func__, fl->pattern_offset);
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index a726c0a..36d2a29 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -980,7 +980,8 @@ pnfs_update_layout(struct inode *ino,
> arg.offset -= pg_offset;
> arg.length += pg_offset;
> }
> - arg.length = PAGE_CACHE_ALIGN(arg.length);
> + if (arg.length != NFS4_MAX_UINT64)
> + arg.length = PAGE_CACHE_ALIGN(arg.length);
>
> lseg = send_layoutget(lo, ctx, &arg, gfp_flags);
> if (!lseg && first) {
next prev parent reply other threads:[~2011-09-21 9:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 18:52 [PATCH 1/1] Prevent 3.0 from crashing if it receives a partial layout Fred Isaman
2011-09-21 9:51 ` Boaz Harrosh [this message]
2011-09-21 13:11 ` Fred Isaman
[not found] ` <CADnza47=3Q53=DO=KMdeu_snuQ-q3RV2KshfMOwXL6o+BcYaLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-21 13:44 ` Boaz Harrosh
2011-10-12 16:00 ` Boaz Harrosh
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=4E79B39B.1080102@panasas.com \
--to=bharrosh@panasas.com \
--cc=Trond.Myklebust@netapp.com \
--cc=aemerson@linuxbox.com \
--cc=iisaman@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=matt@linuxbox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.