diff options
author | Fred Isaman <iisaman@netapp.com> | 2011-03-03 10:13:46 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-11 15:38:44 -0500 |
commit | 7ffd10640dc008f6d5a375bd6450755745c63c7d (patch) | |
tree | d63a12d4319ab8e6c95c6be9c99756800ba38f91 /fs/nfs | |
parent | 0382b74409c6b9ef12c952b50bb44f557a361a43 (diff) |
NFSv4.1: remove GETATTR from ds writes
Any WRITE compound directed to a data server needs to have the
GETATTR calls suppressed.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 6 | ||||
-rw-r--r-- | 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 15248549c89f..da902123ec53 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3149,7 +3149,11 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag | |||
3149 | { | 3149 | { |
3150 | struct nfs_server *server = NFS_SERVER(data->inode); | 3150 | struct nfs_server *server = NFS_SERVER(data->inode); |
3151 | 3151 | ||
3152 | data->args.bitmask = server->cache_consistency_bitmask; | 3152 | if (data->lseg) { |
3153 | data->args.bitmask = NULL; | ||
3154 | data->res.fattr = NULL; | ||
3155 | } else | ||
3156 | data->args.bitmask = server->cache_consistency_bitmask; | ||
3153 | if (!data->write_done_cb) | 3157 | if (!data->write_done_cb) |
3154 | data->write_done_cb = nfs4_write_done_cb; | 3158 | data->write_done_cb = nfs4_write_done_cb; |
3155 | data->res.server = server; | 3159 | data->res.server = server; |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index a656b6e179b0..0f2dcfb41f29 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, | |||
2275 | encode_putfh(xdr, args->fh, &hdr); | 2275 | encode_putfh(xdr, args->fh, &hdr); |
2276 | encode_write(xdr, args, &hdr); | 2276 | encode_write(xdr, args, &hdr); |
2277 | req->rq_snd_buf.flags |= XDRBUF_WRITE; | 2277 | req->rq_snd_buf.flags |= XDRBUF_WRITE; |
2278 | encode_getfattr(xdr, args->bitmask, &hdr); | 2278 | if (args->bitmask) |
2279 | encode_getfattr(xdr, args->bitmask, &hdr); | ||
2279 | encode_nops(&hdr); | 2280 | encode_nops(&hdr); |
2280 | } | 2281 | } |
2281 | 2282 | ||
@@ -5694,8 +5695,9 @@ static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr, | |||
5694 | status = decode_write(xdr, res); | 5695 | status = decode_write(xdr, res); |
5695 | if (status) | 5696 | if (status) |
5696 | goto out; | 5697 | goto out; |
5697 | decode_getfattr(xdr, res->fattr, res->server, | 5698 | if (res->fattr) |
5698 | !RPC_IS_ASYNC(rqstp->rq_task)); | 5699 | decode_getfattr(xdr, res->fattr, res->server, |
5700 | !RPC_IS_ASYNC(rqstp->rq_task)); | ||
5699 | if (!status) | 5701 | if (!status) |
5700 | status = res->count; | 5702 | status = res->count; |
5701 | out: | 5703 | out: |