Bug 773100

Summary: Write-behind does not honor O_SYNC properly
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: write-behindAssignee: Jeff Darcy <jdarcy>
Status: CLOSED CURRENTRELEASE QA Contact: Anush Shetty <ashetty>
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: amarts, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:54:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 817967    

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