Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 296811 Details for
Bug 435443
Add patch to prevent NFS cache invalidation after write calls
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch1 -- NFSv4: Add post-op attributes to NFSv4 write and commit callbacks
0011-BZ-435443-NFSv4-Add-post-op-attributes-to-NFSv4-wr.patch (text/plain), 5.51 KB, created by
Jeff Layton
on 2008-03-04 21:29:38 UTC
(
hide
)
Description:
patch1 -- NFSv4: Add post-op attributes to NFSv4 write and commit callbacks
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2008-03-04 21:29:38 UTC
Size:
5.51 KB
patch
obsolete
>From afade27934e4cd90f72a0df065b6ba1a72552c42 Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Tue, 4 Mar 2008 16:05:56 -0500 >Subject: [PATCH] BZ#435443: NFSv4: Add post-op attributes to NFSv4 write and commit callbacks. > >Upstream commit 4f9838c7ecd14f31f701f64fa65ded132fc0db8a > >Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> >Backported-by: Jeff Layton <jlayton@redhat.com> >--- > fs/nfs/nfs4proc.c | 15 ++++++++++++++- > fs/nfs/nfs4xdr.c | 28 ++++++++++++++++++++++------ > include/linux/nfs_xdr.h | 2 ++ > 3 files changed, 38 insertions(+), 7 deletions(-) > >diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c >index 9503302..d9b01c3 100644 >--- a/fs/nfs/nfs4proc.c >+++ b/fs/nfs/nfs4proc.c >@@ -1351,6 +1351,8 @@ static int _nfs4_proc_write(struct nfs_write_data *wdata) > > nfs_fattr_init(fattr); > status = rpc_call_sync(server->client, &msg, rpcflags); >+ if (status >= 0) >+ nfs_post_op_update_inode(inode, fattr); > dprintk("NFS reply write: %d\n", status); > return status; > } >@@ -1968,8 +1970,10 @@ nfs4_write_done(struct rpc_task *task) > rpc_restart_call(task); > return; > } >- if (task->tk_status >= 0) >+ if (task->tk_status >= 0) { > renew_lease(NFS_SERVER(inode), data->timestamp); >+ nfs_post_op_update_inode(inode, data->res.fattr); >+ } > /* Call back common NFS writeback processing */ > nfs_writeback_done(task); > } >@@ -1985,6 +1989,7 @@ nfs4_proc_write_setup(struct nfs_write_data *data, int how) > .rpc_cred = data->cred, > }; > struct inode *inode = data->inode; >+ struct nfs_server *server = NFS_SERVER(inode); > int stable; > int flags; > >@@ -1996,6 +2001,8 @@ nfs4_proc_write_setup(struct nfs_write_data *data, int how) > } else > stable = NFS_UNSTABLE; > data->args.stable = stable; >+ data->args.bitmask = server->attr_bitmask; >+ data->res.server = server; > > data->timestamp = jiffies; > >@@ -2017,6 +2024,8 @@ nfs4_commit_done(struct rpc_task *task) > rpc_restart_call(task); > return; > } >+ if (task->tk_status >= 0) >+ nfs_post_op_update_inode(inode, data->res.fattr); > /* Call back common NFS writeback processing */ > nfs_commit_done(task); > } >@@ -2032,8 +2041,12 @@ nfs4_proc_commit_setup(struct nfs_write_data *data, int how) > .rpc_cred = data->cred, > }; > struct inode *inode = data->inode; >+ struct nfs_server *server = NFS_SERVER(inode); > int flags; > >+ data->args.bitmask = server->attr_bitmask; >+ data->res.server = server; >+ > /* Set the initial flags for the task. */ > flags = (how & FLUSH_SYNC) ? 0 : RPC_TASK_ASYNC; > >diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c >index 52cde02..e118ce1 100644 >--- a/fs/nfs/nfs4xdr.c >+++ b/fs/nfs/nfs4xdr.c >@@ -154,16 +154,20 @@ static int nfs_stat_to_errno(int); > op_decode_hdr_maxsz + 2) > #define NFS4_enc_write_sz (compound_encode_hdr_maxsz + \ > encode_putfh_maxsz + \ >- op_encode_hdr_maxsz + 8) >+ op_encode_hdr_maxsz + 8 + \ >+ encode_getattr_maxsz) > #define NFS4_dec_write_sz (compound_decode_hdr_maxsz + \ > decode_putfh_maxsz + \ >- op_decode_hdr_maxsz + 4) >+ op_decode_hdr_maxsz + 4 + \ >+ decode_getattr_maxsz) > #define NFS4_enc_commit_sz (compound_encode_hdr_maxsz + \ > encode_putfh_maxsz + \ >- op_encode_hdr_maxsz + 3) >+ op_encode_hdr_maxsz + 3 + \ >+ encode_getattr_maxsz) > #define NFS4_dec_commit_sz (compound_decode_hdr_maxsz + \ > decode_putfh_maxsz + \ >- op_decode_hdr_maxsz + 2) >+ op_decode_hdr_maxsz + 2 + \ >+ decode_getattr_maxsz) > #define NFS4_enc_open_sz (compound_encode_hdr_maxsz + \ > encode_putfh_maxsz + \ > op_encode_hdr_maxsz + \ >@@ -1667,7 +1671,7 @@ static int nfs4_xdr_enc_write(struct rpc_rqst *req, uint32_t *p, struct nfs_writ > { > struct xdr_stream xdr; > struct compound_hdr hdr = { >- .nops = 2, >+ .nops = 3, > }; > int status; > >@@ -1677,6 +1681,9 @@ static int nfs4_xdr_enc_write(struct rpc_rqst *req, uint32_t *p, struct nfs_writ > if (status) > goto out; > status = encode_write(&xdr, args); >+ if (status) >+ goto out; >+ status = encode_getfattr(&xdr, args->bitmask); > out: > return status; > } >@@ -1688,7 +1695,7 @@ static int nfs4_xdr_enc_commit(struct rpc_rqst *req, uint32_t *p, struct nfs_wri > { > struct xdr_stream xdr; > struct compound_hdr hdr = { >- .nops = 2, >+ .nops = 3, > }; > int status; > >@@ -1698,6 +1705,9 @@ static int nfs4_xdr_enc_commit(struct rpc_rqst *req, uint32_t *p, struct nfs_wri > if (status) > goto out; > status = encode_commit(&xdr, args); >+ if (status) >+ goto out; >+ status = encode_getfattr(&xdr, args->bitmask); > out: > return status; > } >@@ -3730,6 +3740,9 @@ static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, uint32_t *p, struct nfs_wr > if (status) > goto out; > status = decode_write(&xdr, res); >+ if (status) >+ goto out; >+ decode_getfattr(&xdr, res->fattr, res->server); > if (!status) > status = res->count; > out: >@@ -3753,6 +3766,9 @@ static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, uint32_t *p, struct nfs_w > if (status) > goto out; > status = decode_commit(&xdr, res); >+ if (status) >+ goto out; >+ decode_getfattr(&xdr, res->fattr, res->server); > out: > return status; > } >diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h >index 97b54e2..19334da 100644 >--- a/include/linux/nfs_xdr.h >+++ b/include/linux/nfs_xdr.h >@@ -263,6 +263,7 @@ struct nfs_writeargs { > enum nfs3_stable_how stable; > unsigned int pgbase; > struct page ** pages; >+ const u32 * bitmask; > }; > > struct nfs_writeverf { >@@ -274,6 +275,7 @@ struct nfs_writeres { > struct nfs_fattr * fattr; > struct nfs_writeverf * verf; > __u32 count; >+ const struct nfs_server *server; > }; > > /* >-- >1.5.3.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 435443
:
296373
|
296374
|
296376
| 296811