Bug 885743 - data corrupt when file modified by client and server continuously
Summary: data corrupt when file modified by client and server continuously
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 885536
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-10 14:11 UTC by Jeff Layton
Modified: 2014-06-18 07:42 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 885536
Environment:
Last Closed: 2012-12-11 12:13:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch -- don't extend writes to cover entire page when pagecache is invalid (2.26 KB, patch)
2012-12-10 14:13 UTC, Jeff Layton
no flags Details | Diff

Description Jeff Layton 2012-12-10 14:11:32 UTC
+++ This bug was initially created as a clone of Bug #885536 +++

Description of problem:
A file is modified by client and server continuously, and data is not sync.

# mount localhost:/export /mntpath

# echo abc > /mntpath/file
# echo def >> /export/file
# echo ghi >> /mntpath/file

Then I check this file, data is like this:
abc\n\0\0\0\0ghi\n


Even when I use nfsv3, either i 'sync' after writing 'def' on server side.

Comment 1 Jeff Layton 2012-12-10 14:13:50 UTC
Created attachment 660887 [details]
patch -- don't extend writes to cover entire page when pagecache is invalid

Jian, this patch seems to fix the bug for me. Can you confirm whether it does for you?

Comment 2 Jian Li 2012-12-11 03:24:15 UTC
(In reply to comment #1)
> Created attachment 660887 [details]
> patch -- don't extend writes to cover entire page when pagecache is invalid
> 
> Jian, this patch seems to fix the bug for me. Can you confirm whether it
> does for you?

OK, I would check it.

Comment 3 Jeff Layton 2012-12-11 12:13:29 UTC
Patch sent to Trond and he's taken it into his bugfixes branch. It should get merged early in 3.8 and go into stable kernels soon after. I'll go ahead and close this with a resolution of UPSTREAM.

Comment 4 Jian Li 2012-12-13 09:22:19 UTC
This patch is tested on 3.6.0-0.29.el7, bug resolved.


Note You need to log in before you can comment on or make changes to this bug.