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 298011 Details for
Bug 437430
[PATCH][NFS]Fix a potential file corruption issue when writing
[?]
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 for fix this problem.
nfs_write_pageuptodate.patch (text/plain), 1.39 KB, created by
jiangguiqing
on 2008-03-14 03:50:30 UTC
(
hide
)
Description:
Patch for fix this problem.
Filename:
MIME Type:
Creator:
jiangguiqing
Created:
2008-03-14 03:50:30 UTC
Size:
1.39 KB
patch
obsolete
>--- linux-2.6.23.i686/fs/nfs/write.c.orig 2008-03-06 20:23:46.000000000 +0800 >+++ linux-2.6.23.i686/fs/nfs/write.c 2008-03-06 20:30:50.000000000 +0800 >@@ -708,6 +708,17 @@ int nfs_flush_incompatible(struct file * > } > > /* >+ * If the page cache is marked as unsafe or invalid, then we can't rely on >+ * the PageUptodate() flag. In this case, we will need to turn off >+ * write optimisations that depend on the page contents being correct. >+ */ >+static int nfs_write_pageuptodate(struct page *page, struct inode *inode) >+{ >+ return PageUptodate(page) && >+ !(NFS_I(inode)->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA)); >+} >+ >+/* > * Update and possibly write a cached page of an NFS file. > * > * XXX: Keep an eye on generic_file_read to make sure it doesn't do bad >@@ -730,8 +741,13 @@ int nfs_updatepage(struct file *file, st > /* If we're not using byte range locks, and we know the page > * is entirely in cache, it may be more efficient to avoid > * fragmenting write requests. >+ * is up to date, it may be more efficient to extend the write >+ * to cover the entire page in order to avoid fragmentation >+ * inefficiencies. > */ >- if (PageUptodate(page) && inode->i_flock == NULL && !(file->f_mode & O_SYNC)) { >+ if (nfs_write_pageuptodate(page, inode) && >+ inode->i_flock == NULL && >+ !(file->f_flags & O_SYNC)) { > count = max(count + offset, nfs_page_length(page)); > offset = 0; > }
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 437430
: 298011