Commit 7ffd1064 authored by Fred Isaman's avatar Fred Isaman Committed by Trond Myklebust

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: default avatarFred Isaman <iisaman@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 0382b744
...@@ -3149,6 +3149,10 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag ...@@ -3149,6 +3149,10 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag
{ {
struct nfs_server *server = NFS_SERVER(data->inode); struct nfs_server *server = NFS_SERVER(data->inode);
if (data->lseg) {
data->args.bitmask = NULL;
data->res.fattr = NULL;
} else
data->args.bitmask = server->cache_consistency_bitmask; data->args.bitmask = server->cache_consistency_bitmask;
if (!data->write_done_cb) if (!data->write_done_cb)
data->write_done_cb = nfs4_write_done_cb; data->write_done_cb = nfs4_write_done_cb;
......
...@@ -2275,6 +2275,7 @@ static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr, ...@@ -2275,6 +2275,7 @@ static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
encode_putfh(xdr, args->fh, &hdr); encode_putfh(xdr, args->fh, &hdr);
encode_write(xdr, args, &hdr); encode_write(xdr, args, &hdr);
req->rq_snd_buf.flags |= XDRBUF_WRITE; req->rq_snd_buf.flags |= XDRBUF_WRITE;
if (args->bitmask)
encode_getfattr(xdr, args->bitmask, &hdr); encode_getfattr(xdr, args->bitmask, &hdr);
encode_nops(&hdr); encode_nops(&hdr);
} }
...@@ -5694,6 +5695,7 @@ static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr, ...@@ -5694,6 +5695,7 @@ static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
status = decode_write(xdr, res); status = decode_write(xdr, res);
if (status) if (status)
goto out; goto out;
if (res->fattr)
decode_getfattr(xdr, res->fattr, res->server, decode_getfattr(xdr, res->fattr, res->server,
!RPC_IS_ASYNC(rqstp->rq_task)); !RPC_IS_ASYNC(rqstp->rq_task));
if (!status) if (!status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment