Bug 798594

Summary: Write-behind: enable-trickling-writes option not working
Product: [Community] GlusterFS Reporter: Anush Shetty <ashetty>
Component: write-behindAssignee: Raghavendra G <rgowdapp>
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 00:46:54 EDT Type: ---
Regression: --- Mount Type: fuse
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
test-case none

Description Anush Shetty 2012-02-29 05:53:44 EST
Description of problem: In write-behind, the enable-trickling-writes option isn't working properly. The fuse client was mounted with --direct-io-mode=on option when enable-trickling-writes option was on. 

Version-Release number of selected component (if applicable): 3.3.0qa24

How reproducible: Consistently

Steps to Reproduce:
1. Mount the fuse client with --direct-io-mode=on and enable-trickling-writes option set to on. While the writes are in progress on the client, the stat -c %s value is measured from the backend.

2. Repeat the same step above but by mounting the fuse client with --direct-io-mode=on and enable-trickling-writes option set to off.

Actual results:

The stat on the backend returned updated values even when enable-trickling-writes was off. The fd wasn't closed or the size didn't exceed 128k

Expected results:
The stat shouldn't have returned updated values. 
Additional info:
Comment 1 Raghavendra G 2012-03-28 00:44:03 EDT
Created attachment 573222 [details]

With this test case, the option enable-trickling-writes work as expected.
Comment 2 Raghavendra G 2012-03-28 00:46:54 EDT
With the attached test case I've found that the option works as expected. Please make sure that
1. volume file is actually changed with correct option/value.
2. there are no other operations interleaved between writes, since they tend to flush the writes to disk. For eg., stat should be done on backend instead from the mountpoint since stat flushes all the writes issued before.

With the above observations, I am closing the bug.