From: andros@netapp.com
To: pnfs@linux-nfs.org
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: [PATCH 1/5] pnfsd: fix NFS4ERR_BADIOMODE in layoutget
Date: Fri, 5 Feb 2010 12:10:09 -0500 [thread overview]
Message-ID: <1265389813-6823-2-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1265389813-6823-1-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
If an invalid iomode, or an iomode of LAYOUTIOMODE4_ANY is specified, the
metadata server MUST return NFS4ERR_BADIOMODE.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfsd/nfs4proc.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 769628f..575e1b6 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1114,21 +1114,14 @@ nfsd4_layoutget(struct svc_rqst *rqstp,
if (status)
goto out;
- status = nfserr_inval;
+ status = nfserr_badiomode;
if (lgp->lg_seg.iomode != IOMODE_READ &&
- lgp->lg_seg.iomode != IOMODE_RW &&
- lgp->lg_seg.iomode != IOMODE_ANY) {
+ lgp->lg_seg.iomode != IOMODE_RW) {
dprintk("pNFS %s: invalid iomode %d\n", __func__,
lgp->lg_seg.iomode);
goto out;
}
- status = nfserr_badiomode;
- if (lgp->lg_seg.iomode == IOMODE_ANY) {
- dprintk("pNFS %s: IOMODE_ANY is not allowed\n", __func__);
- goto out;
- }
-
/* Set up arguments so layout can be retrieved at encode time */
lgp->lg_fhp = current_fh;
copy_clientid((clientid_t *)&lgp->lg_seg.clientid, cstate->session);
--
1.6.6
next prev parent reply other threads:[~2010-02-05 17:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 17:10 [PATCH 0/5] pnfs DLM cluster only use read iomode layouts andros
2010-02-05 17:10 ` andros [this message]
2010-02-05 17:10 ` [PATCH 2/5] pnfsd: fix pnfs_export_operations layoutget valid errors andros
2010-02-05 17:10 ` [PATCH 3/5] pnfsd: DLM file layout only support read iomode layouts andros
2010-02-05 17:10 ` [PATCH 4/5] pnfsd: fix DLM file layout no device return andros
2010-02-05 17:10 ` [PATCH 5/5] pnfs: set failed layout bit per iomode andros
2010-02-07 9:33 ` [pnfs] [PATCH 4/5] pnfsd: fix DLM file layout no device return Boaz Harrosh
2010-02-07 9:26 ` [pnfs] [PATCH 3/5] pnfsd: DLM file layout only support read iomode layouts Boaz Harrosh
2010-02-07 9:05 ` [pnfs] [PATCH 2/5] pnfsd: fix pnfs_export_operations layoutget valid errors Benny Halevy
2010-02-08 20:41 ` Andy Adamson
2010-02-08 21:01 ` J. Bruce Fields
2010-02-09 8:34 ` Boaz Harrosh
2010-02-09 12:52 ` 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=1265389813-6823-2-git-send-email-andros@netapp.com \
--to=andros@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=pnfs@linux-nfs.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