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 158367 Details for
Bug 228801
NFS race can create persistent stale negative dentries
[?]
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]
Newer patch to avoid stale negative dentries
linux-2.6.9-nfs-jiffy-wrap-fixes-2.patch (text/plain), 3.98 KB, created by
Fabio Olive Leite
on 2007-07-02 19:33:08 UTC
(
hide
)
Description:
Newer patch to avoid stale negative dentries
Filename:
MIME Type:
Creator:
Fabio Olive Leite
Created:
2007-07-02 19:33:08 UTC
Size:
3.98 KB
patch
obsolete
>diff -pruN linux-2.6.9.orig/fs/nfs/dir.c linux-2.6.9/fs/nfs/dir.c >--- linux-2.6.9.orig/fs/nfs/dir.c 2007-06-28 17:53:46.000000000 -0300 >+++ linux-2.6.9/fs/nfs/dir.c 2007-07-02 16:10:25.000000000 -0300 >@@ -621,12 +621,17 @@ int nfs_fsync_dir(struct file *filp, str > */ > static inline int nfs_check_verifier(struct inode *dir, struct dentry *dentry) > { >+ unsigned long verf; >+ > if (IS_ROOT(dentry)) > return 1; >+ verf = (unsigned long)dentry->d_fsdata; > if ((NFS_I(dir)->cache_validity & NFS_INO_INVALID_ATTR) != 0 >- || nfs_attribute_timeout(dir)) >+ || nfs_attribute_timeout(dir) >+ || nfs_caches_unstable(dir) >+ || verf != NFS_I(dir)->cache_change_attribute) > return 0; >- return nfs_verify_change_attribute(dir, (unsigned long)dentry->d_fsdata); >+ return 1; > } > > static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) >diff -pruN linux-2.6.9.orig/fs/nfs/inode.c linux-2.6.9/fs/nfs/inode.c >--- linux-2.6.9.orig/fs/nfs/inode.c 2007-06-28 17:54:08.000000000 -0300 >+++ linux-2.6.9/fs/nfs/inode.c 2007-07-02 16:10:25.000000000 -0300 >@@ -1447,6 +1447,7 @@ static int nfs_update_inode(struct inode > struct nfs_inode *nfsi = NFS_I(inode); > loff_t cur_isize, new_isize; > unsigned int invalid = 0; >+ unsigned long now = jiffies; > int data_stable; > > dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", >@@ -1475,7 +1476,11 @@ static int nfs_update_inode(struct inode > * Update the read time so we don't revalidate too often. > */ > nfsi->read_cache_jiffies = fattr->time_start; >- nfsi->last_updated = jiffies; >+ nfsi->last_updated = now; >+ >+ /* Fix a wraparound issue with nfsi->cache_change_attribute */ >+ if (time_before(now, nfsi->cache_change_attribute)) >+ nfsi->cache_change_attribute = now - 600*HZ; > > /* Are we racing with known updates of the metadata on the server? */ > data_stable = nfs_verify_change_attribute(inode, fattr->time_start); >@@ -1501,7 +1506,7 @@ static int nfs_update_inode(struct inode > inode->i_size = new_isize; > invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; > } >- nfsi->cache_change_attribute = jiffies; >+ nfsi->cache_change_attribute = now; > dprintk("NFS: isize change on server for file %s/%ld\n", > inode->i_sb->s_id, inode->i_ino); > } >@@ -1512,14 +1517,14 @@ static int nfs_update_inode(struct inode > dprintk("NFS: mtime change on server for file %s/%ld\n", > inode->i_sb->s_id, inode->i_ino); > invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; >- nfsi->cache_change_attribute = jiffies; >+ nfsi->cache_change_attribute = now; > } > > /* If ctime has changed we should definitely clear access+acl caches */ > if (!timespec_equal(&inode->i_ctime, &fattr->ctime)) { > invalid |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; > memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime)); >- nfsi->cache_change_attribute = jiffies; >+ nfsi->cache_change_attribute = now; > } > memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime)); > >@@ -1550,7 +1555,7 @@ static int nfs_update_inode(struct inode > inode->i_sb->s_id, inode->i_ino); > nfsi->change_attr = fattr->change_attr; > invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; >- nfsi->cache_change_attribute = jiffies; >+ nfsi->cache_change_attribute = now; > } else > invalid &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA); > } >@@ -1559,11 +1564,11 @@ static int nfs_update_inode(struct inode > if (invalid & NFS_INO_INVALID_ATTR) { > nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE); > nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); >- nfsi->attrtimeo_timestamp = jiffies; >- } else if (time_after(jiffies, nfsi->attrtimeo_timestamp+nfsi->attrtimeo)) { >+ nfsi->attrtimeo_timestamp = now; >+ } else if (time_after(now, nfsi->attrtimeo_timestamp+nfsi->attrtimeo)) { > if ((nfsi->attrtimeo <<= 1) > NFS_MAXATTRTIMEO(inode)) > nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); >- nfsi->attrtimeo_timestamp = jiffies; >+ nfsi->attrtimeo_timestamp = now; > } > /* Don't invalidate the data if we were to blame */ > if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)
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 228801
:
148096
|
148097
|
148440
|
150805
|
157492
| 158367