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 297252 Details for
Bug 436132
Reduce NFS cache invalidations due to writes from same client
[?]
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 3 -- don't allow faked wcc attrs to do backward mtime updates
0003-BZ-436132-NFS-when-faking-wcc-attrs-don-t-allow-b.patch (text/plain), 2.33 KB, created by
Jeff Layton
on 2008-03-07 21:05:22 UTC
(
hide
)
Description:
patch 3 -- don't allow faked wcc attrs to do backward mtime updates
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2008-03-07 21:05:22 UTC
Size:
2.33 KB
patch
obsolete
>From 0d7bbd3321f098846674851b678bbc7cb8fc2952 Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Fri, 7 Mar 2008 15:57:34 -0500 >Subject: [PATCH] BZ#436132: NFS: when faking wcc attrs, don't allow backward mtime updates > >--- > fs/nfs/inode.c | 13 +++++++++---- > include/linux/nfs_xdr.h | 1 + > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c >index 47199a0..b437cf1 100644 >--- a/fs/nfs/inode.c >+++ b/fs/nfs/inode.c >@@ -1341,8 +1341,13 @@ static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) > nfsi->cache_change_attribute = jiffies; > } > if (timespec_equal(&inode->i_mtime, &fattr->pre_mtime)) { >- memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime)); >- nfsi->cache_change_attribute = jiffies; >+ if ((fattr->valid & NFS_ATTR_WCC_FAKE) && >+ timespec_before(&fattr->mtime, &inode->i_mtime)) { >+ memcpy(&fattr->mtime, &inode->i_mtime, sizeof(fattr->mtime)); >+ } else { >+ memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime)); >+ nfsi->cache_change_attribute = jiffies; >+ } > } > if (inode->i_size == fattr->pre_size && nfsi->npages == 0) { > inode->i_size = fattr->size; >@@ -1483,13 +1488,13 @@ int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fa > { > if ((fattr->valid & NFS_ATTR_FATTR_V4) != 0) { > fattr->pre_change_attr = NFS_I(inode)->change_attr; >- fattr->valid |= NFS_ATTR_WCC_V4; >+ fattr->valid |= (NFS_ATTR_WCC_V4|NFS_ATTR_WCC_FAKE); > } > if ((fattr->valid & NFS_ATTR_FATTR) != 0) { > memcpy(&fattr->pre_ctime, &inode->i_ctime, sizeof(fattr->pre_ctime)); > memcpy(&fattr->pre_mtime, &inode->i_mtime, sizeof(fattr->pre_mtime)); > fattr->pre_size = inode->i_size; >- fattr->valid |= NFS_ATTR_WCC; >+ fattr->valid |= (NFS_ATTR_WCC|NFS_ATTR_WCC_FAKE); > } > return nfs_post_op_update_inode(inode, fattr); > } >diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h >index 54185c5..7a68f25 100644 >--- a/include/linux/nfs_xdr.h >+++ b/include/linux/nfs_xdr.h >@@ -49,6 +49,7 @@ struct nfs_fattr { > #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ > #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ > #define NFS_ATTR_WCC_V4 0x0010 /* pre-op change attribute */ >+#define NFS_ATTR_WCC_FAKE 0x0020 /* pre-op attrs are faked */ > > /* > * Info on the file system >-- >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 436132
:
297190
|
297191
|
297250
|
297251
|
297252
|
309488
|
309489
|
309490
|
309620