Bug 764041 (GLUSTER-2309)

Summary: write-behind returns bogus post-attributes
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: write-behindAssignee: Raghavendra G <rgowdapp>
Status: CLOSED EOL QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: mainlineCC: bugs, gluster-bugs, ndevos, rwheeler
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://git.fedorahosted.org/git/?p=CloudFS.git;a=blob;f=patches/wb-quota.patch;h=a31b9e82d864f464291fd7918bc5648c0625db1b;hb=HEAD
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-22 15:46:38 UTC Type: ---
Regression: RTNR Mount Type: All
Documentation: DNR CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Darcy 2011-01-21 16:43:13 UTC
This is mostly noticeable because it breaks features/quota.  The problem is that wb_stack_unwind returns a bogus post-operation iatt structure, so the caller sees zero blocks consumed against quota.  The patch at the URL associated with this bug fills in ia_blocks so that features/quota has something to work with.

Comment 1 Raghavendra G 2011-03-03 00:29:17 UTC
Hi Jeff,

As you've commented in the patch, this is not complete fix. Even then, this is not correct fix, since ia_blocks should contain total number of blocks allocated to file and not just blocks consumed by _this_ write request (request->write_size, contains write_size of current write request). Also, block-size may not be the same everywhere.

regards,
Raghavendra.

Comment 2 Jeff Darcy 2011-03-07 11:55:18 UTC
(In reply to comment #1)
> As you've commented in the patch, this is not complete fix. Even then, this is
> not correct fix, since ia_blocks should contain total number of blocks
> allocated to file and not just blocks consumed by _this_ write request
> (request->write_size, contains write_size of current write request). Also,
> block-size may not be the same everywhere.


The part about total number of blocks vs. blocks for this request is valid.  Thanks for catching that.  This needs to be resolved if we want to use these translators together, and I hope we can do so without incurring the cost of an extra stat() every time we write.

As for the block size, the reason the patch uses 512 is that features/quota does so (see quota_writev_cbk).  We can make write-behind more block-size aware, but only if we do likewise for quota.

Comment 3 Amar Tumballi 2011-09-28 04:28:31 UTC
Very hard to solve witout having a unified buffer caching. Marking it for future release.

Comment 4 Kaleb KEITHLEY 2015-10-22 15:46:38 UTC
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.