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 674779 Details for
Bug 869441
NFS client sometimes gets wrong value back from stat()
[?]
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 -- never apply attributes if the ctime is older than the ones we already have
0001-nfs-fix-attribute-cache-coherency-after-truncate.patch (text/plain), 1.96 KB, created by
Jeff Layton
on 2013-01-08 12:43:05 UTC
(
hide
)
Description:
patch -- never apply attributes if the ctime is older than the ones we already have
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2013-01-08 12:43:05 UTC
Size:
1.96 KB
patch
obsolete
>From af4a02529ce4edf9e9409ca9d8b4bee7413a2376 Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Tue, 8 Jan 2013 07:38:14 -0500 >Subject: [PATCH] nfs: fix attribute cache coherency after truncate > >Signed-off-by: Jeff Layton <jlayton@redhat.com> >--- > fs/nfs/inode.c | 24 +++++++++++++++++++----- > 1 file changed, 19 insertions(+), 5 deletions(-) > >diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c >index ebeb94c..fb147cf 100644 >--- a/fs/nfs/inode.c >+++ b/fs/nfs/inode.c >@@ -1032,7 +1032,7 @@ static int nfs_ctime_need_update(const struct inode *inode, const struct nfs_fat > { > if (!(fattr->valid & NFS_ATTR_FATTR_CTIME)) > return 0; >- return timespec_compare(&fattr->ctime, &inode->i_ctime) > 0; >+ return timespec_compare(&fattr->ctime, &inode->i_ctime); > } > > static int nfs_size_need_update(const struct inode *inode, const struct nfs_fattr *fattr) >@@ -1168,12 +1168,26 @@ void _nfs_display_fhandle(const struct nfs_fh *fh, const char *caption) > */ > static int nfs_inode_attrs_need_update(const struct inode *inode, const struct nfs_fattr *fattr) > { >+ int ret; > const struct nfs_inode *nfsi = NFS_I(inode); > >- return ((long)fattr->gencount - (long)nfsi->attr_gencount) > 0 || >- nfs_ctime_need_update(inode, fattr) || >- nfs_size_need_update(inode, fattr) || >- ((long)nfsi->attr_gencount - (long)nfs_read_attr_generation_counter() > 0); >+ if (((long)fattr->gencount - (long)nfsi->attr_gencount) > 0) >+ return 1; >+ >+ /* >+ * If the fattr's ctime is newer than the one in the inode, then >+ * it's automatically considered good. If it's older, then toss it >+ * out unconditionally. If it's equal then we must check the size >+ * and gencount. >+ */ >+ ret = nfs_ctime_need_update(inode, fattr); >+ if (ret > 0) >+ return 1; >+ else if (ret < 0) >+ return 0; >+ >+ return nfs_size_need_update(inode, fattr) || >+ ((long)nfsi->attr_gencount - (long)nfs_read_attr_generation_counter()) > 0; > } > > static int nfs_refresh_inode_locked(struct inode *inode, struct nfs_fattr *fattr) >-- >1.7.11.7 >
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 869441
:
632423
|
632425
|
632426
| 674779