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 147381 Details for
Bug 227373
link() on nfsv4 sometimes fails to update i_nlink count
[?]
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]
patch 2 -- optimize nfs4 link calls and add postop attributes
linux-2.6.9-nfs4-link-optimize.patch (text/plain), 3.81 KB, created by
Jeff Layton
on 2007-02-05 17:57:39 UTC
(
hide
)
Description:
patch 2 -- optimize nfs4 link calls and add postop attributes
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-02-05 17:57:39 UTC
Size:
3.81 KB
patch
obsolete
>--- linux-2.6.9/include/linux/nfs_xdr.h.~1~ >+++ linux-2.6.9/include/linux/nfs_xdr.h >@@ -557,8 +557,17 @@ struct nfs4_link_arg { > const struct nfs_fh * fh; > const struct nfs_fh * dir_fh; > const struct qstr * name; >+ const u32 * bitmask; >+}; >+ >+struct nfs4_link_res { >+ const struct nfs_server * server; >+ struct nfs_fattr * fattr; >+ struct nfs4_change_info cinfo; >+ struct nfs_fattr * dir_attr; > }; > >+ > struct nfs4_lookup_arg { > const struct nfs_fh * dir_fh; > const struct qstr * name; >--- linux-2.6.9/fs/nfs/nfs4proc.c.~1~ >+++ linux-2.6.9/fs/nfs/nfs4proc.c >@@ -1496,22 +1496,34 @@ static int nfs4_proc_rename(struct inode > > static int _nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) > { >+ struct nfs_server *server = NFS_SERVER(inode); > struct nfs4_link_arg arg = { > .fh = NFS_FH(inode), > .dir_fh = NFS_FH(dir), > .name = name, >+ .bitmask = server->attr_bitmask, >+ }; >+ struct nfs_fattr fattr, dir_attr; >+ struct nfs4_link_res res = { >+ .server = server, >+ .fattr = &fattr, >+ .dir_attr = &dir_attr, > }; >- struct nfs4_change_info cinfo = { }; > struct rpc_message msg = { > .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LINK], > .rpc_argp = &arg, >- .rpc_resp = &cinfo, >+ .rpc_resp = &res, > }; > int status; > >- status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); >- if (!status) >- update_changeattr(dir, &cinfo); >+ nfs_fattr_init(res.fattr); >+ nfs_fattr_init(res.dir_attr); >+ status = rpc_call_sync(server->client, &msg, 0); >+ if (!status) { >+ update_changeattr(dir, &res.cinfo); >+ nfs_post_op_update_inode(dir, res.dir_attr); >+ nfs_post_op_update_inode(inode, res.fattr); >+ } > > return status; > } >--- linux-2.6.9/fs/nfs/nfs4xdr.c.~1~ >+++ linux-2.6.9/fs/nfs/nfs4xdr.c >@@ -315,12 +315,18 @@ static int nfs_stat_to_errno(int); > encode_putfh_maxsz + \ > encode_savefh_maxsz + \ > encode_putfh_maxsz + \ >- encode_link_maxsz) >+ encode_link_maxsz + \ >+ decode_getattr_maxsz + \ >+ encode_restorefh_maxsz + \ >+ decode_getattr_maxsz) > #define NFS4_dec_link_sz (compound_decode_hdr_maxsz + \ > decode_putfh_maxsz + \ > decode_savefh_maxsz + \ > decode_putfh_maxsz + \ >- decode_link_maxsz) >+ decode_link_maxsz + \ >+ decode_getattr_maxsz + \ >+ decode_restorefh_maxsz + \ >+ decode_getattr_maxsz) > #define NFS4_enc_symlink_sz (compound_encode_hdr_maxsz + \ > encode_putfh_maxsz + \ > encode_symlink_maxsz + \ >@@ -1299,7 +1305,7 @@ static int nfs4_xdr_enc_link(struct rpc_ > { > struct xdr_stream xdr; > struct compound_hdr hdr = { >- .nops = 4, >+ .nops = 7, > }; > int status; > >@@ -1311,7 +1317,13 @@ static int nfs4_xdr_enc_link(struct rpc_ > goto out; > if ((status = encode_putfh(&xdr, args->dir_fh)) != 0) > goto out; >- status = encode_link(&xdr, args->name); >+ if ((status = encode_link(&xdr, args->name)) != 0) >+ goto out; >+ if ((status = encode_getfattr(&xdr, args->bitmask)) != 0) >+ goto out; >+ if ((status = encode_restorefh(&xdr)) != 0) >+ goto out; >+ status = encode_getfattr(&xdr, args->bitmask); > out: > return status; > } >@@ -3355,7 +3367,7 @@ out: > /* > * Decode LINK response > */ >-static int nfs4_xdr_dec_link(struct rpc_rqst *rqstp, uint32_t *p, struct nfs4_change_info *cinfo) >+static int nfs4_xdr_dec_link(struct rpc_rqst *rqstp, uint32_t *p, struct nfs4_link_res *res) > { > struct xdr_stream xdr; > struct compound_hdr hdr; >@@ -3370,7 +3382,17 @@ static int nfs4_xdr_dec_link(struct rpc_ > goto out; > if ((status = decode_putfh(&xdr)) != 0) > goto out; >- status = decode_link(&xdr, cinfo); >+ if ((status = decode_link(&xdr, &res->cinfo)) != 0) >+ goto out; >+ /* >+ * Note order: OP_LINK leaves the directory as the current >+ * filehandle. >+ */ >+ if (decode_getfattr(&xdr, res->dir_attr, res->server) != 0) >+ goto out; >+ if ((status = decode_restorefh(&xdr)) != 0) >+ goto out; >+ decode_getfattr(&xdr, res->fattr, res->server); > out: > return status; > }
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 227373
:
147380
| 147381