Bug 773100 - Write-behind does not honor O_SYNC properly
Summary: Write-behind does not honor O_SYNC properly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: write-behind
Version: mainline
Hardware: Unspecified
OS: All
unspecified
high
Target Milestone: ---
Assignee: Jeff Darcy
QA Contact: Anush Shetty
URL:
Whiteboard:
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-01-10 22:51 UTC by Jeff Darcy
Modified: 2013-07-24 17:54 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:54:31 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jeff Darcy 2012-01-10 22:51:45 UTC
Description of problem:

In the course of investigating what seemed to be better-than-possible performance with replication (replicated performance was better than either replica locally) I found that write-behind does not fully honor write-behind.  It sets the window size to zero, but only prevents requests from being coalesced; they're still queued and executed asynchronously.


How reproducible:

Issue synchronous writes.  Observe their progress through the system in a debugger, or observe total performance that's not possible with proper O_SYNC handling.

  
Actual results:

Asynchronous write processing and inflated performance.  If there's a failure, data that the user thought written might be lost (hence the high severity).


Expected results:

Synchronous write processing and protection of user data.

Comment 1 Jeff Darcy 2012-01-10 22:55:37 UTC
NB: it is possible to avoid this problem thus.

    gluster volume set xxx performance.write-behind off

However, foregoing write-behind on an entire volume to get correct O_SYNC behavior on one file is unacceptable.

Comment 2 Jeff Darcy 2012-01-11 03:06:54 UTC
(In reply to comment #0)
> replica locally) I found that write-behind does not fully honor write-behind

..does not fully honor O_SYNC...

Comment 3 Anand Avati 2012-02-21 10:25:28 UTC
CHANGE: http://review.gluster.com/2626 (Honor O_SYNC etc. properly.) merged in master by Anand Avati (avati)

Comment 4 Anush Shetty 2012-05-31 11:22:49 UTC
Verified with 3.3.0qa45


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