From: Fred Isaman <iisaman@netapp.com>
To: linux-nfs@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: [PATCH 6/7] NFSv4.1: remove GETATTR from ds writes
Date: Mon, 21 Feb 2011 12:49:35 -0500 [thread overview]
Message-ID: <1298310576-13523-7-git-send-email-iisaman@netapp.com> (raw)
In-Reply-To: <1298310576-13523-1-git-send-email-iisaman@netapp.com>
Any WRITE compound directed to a data server needs to have the
GETATTR calls suppressed.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
fs/nfs/nfs4proc.c | 6 +++++-
fs/nfs/nfs4xdr.c | 8 +++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index bfdd36a..4ec34e2 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3148,7 +3148,11 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag
{
struct nfs_server *server = NFS_SERVER(data->inode);
- data->args.bitmask = server->cache_consistency_bitmask;
+ if (data->lseg) {
+ data->args.bitmask = NULL;
+ data->res.fattr = NULL;
+ } else
+ data->args.bitmask = server->cache_consistency_bitmask;
if (!data->write_done_cb)
data->write_done_cb = nfs4_write_done_cb;
data->res.server = server;
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 2380c45..c35880c 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -2275,7 +2275,8 @@ static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
encode_putfh(xdr, args->fh, &hdr);
encode_write(xdr, args, &hdr);
req->rq_snd_buf.flags |= XDRBUF_WRITE;
- encode_getfattr(xdr, args->bitmask, &hdr);
+ if (args->bitmask)
+ encode_getfattr(xdr, args->bitmask, &hdr);
encode_nops(&hdr);
}
@@ -5694,8 +5695,9 @@ static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
status = decode_write(xdr, res);
if (status)
goto out;
- decode_getfattr(xdr, res->fattr, res->server,
- !RPC_IS_ASYNC(rqstp->rq_task));
+ if (res->fattr)
+ decode_getfattr(xdr, res->fattr, res->server,
+ !RPC_IS_ASYNC(rqstp->rq_task));
if (!status)
status = res->count;
out:
--
1.7.2.1
next prev parent reply other threads:[~2011-02-21 17:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 17:49 [PATCH 0/7] pnfs write functionality (wave 4) Fred Isaman
2011-02-21 17:49 ` [PATCH 1/7] NFSv4.1: rearrange nfs_write_rpcsetup Fred Isaman
2011-02-21 17:49 ` [PATCH 2/7] NFSv4.1: add callback to nfs4_write_done Fred Isaman
2011-02-21 17:49 ` [PATCH 3/7] NFSv4.1: Send lseg down into nfs_write_rpcsetup Fred Isaman
2011-02-21 17:49 ` [PATCH 4/7] NFSv4.1: trigger LAYOUTGET for writes Fred Isaman
2011-02-21 18:49 ` Benny Halevy
2011-02-22 1:06 ` Fred Isaman
2011-02-22 2:14 ` Benny Halevy
2011-02-22 1:27 ` Trond Myklebust
2011-02-21 17:49 ` [PATCH 5/7] NFSv4.1: implement generic pnfs layer write switch Fred Isaman
2011-02-21 18:53 ` Benny Halevy
2011-02-22 1:17 ` Fred Isaman
2011-02-21 17:49 ` Fred Isaman [this message]
2011-02-21 17:49 ` [PATCH 7/7] NFSv4.1: pnfs filelayout driver write Fred Isaman
2011-02-22 19:55 ` Fred Isaman
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=1298310576-13523-7-git-send-email-iisaman@netapp.com \
--to=iisaman@netapp.com \
--cc=Trond.Myklebust@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).