Bug 764403 (GLUSTER-2671)

Summary: Quota: size info does not get updated, if the quota enabled after data creation
Product: [Community] GlusterFS Reporter: Saurabh <saurabh>
Component: quotaAssignee: Junaid <junaid>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, vagarwal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Saurabh 2011-04-05 06:54:19 UTC
I tried it again with a latest release, 

if the data creation happens before the quota enable , the list command shows some fake number in the size field,


gluster> volume quota rep1 limit-usage / 4MB
limit set on /
gluster> volume quota rep1 list
	path		  limit_set	     size
----------------------------------------------------------------------------------
/                       4194304  6966018611412467712
gluster> quit


and if you try "ls -R" on the client side you get,


[root@centos-qa-client-2 sbin]# ./gluster volume quota rep1 list
	path		  limit_set	     size
----------------------------------------------------------------------------------
/                       4194304 -2296272101236408320


also the xattr info is equivalent to the data getting created from the client side.

Comment 1 Saurabh 2011-04-05 07:30:59 UTC
as discussed,

The correct way is that it should display the correct size. Anyways I will look into it.

----- Original Message -----
> From: "Saurabh Jain" <saurabh>
> To: "Vijay Bellur" <vijay>, "Mohammed Junaid Ahmed" <junaid>, "Raghavendra Gowdappa"
> <raghavendra>
> Sent: Monday, April 4, 2011 1:17:59 PM
> Subject: Quota size information
> Hello Folks,
> 
> Quota "size" field of the quota list command shows the size presently
> occupied. It works properly, but if the directory is already having
> some data and quota is enabled after wards then
> after a remount of the dir/vol on client, the list command should
> display the size presently occupied.
> 
> Please let me know your interpretation for this scenario. As presently
> the size is displayed as zero even if the data created before enabling
> quota is still there.
> 
> Thanks
> Saurabh


[root@centos-qa-client-2 sbin]# getfattr -m . -d -e hex /mnt/rep1/d1/f.9
getfattr: Removing leading '/' from absolute path names
# file: mnt/rep1/d1/f.9
trusted.afr.rep1-client-0=0x000000000000000000000000
trusted.afr.rep1-client-1=0x000000000000000000000000
trusted.afr.rep1-client-2=0x000000000000000000000000
trusted.gfid=0x032da0de600e455cb5854e4a87ca9a3b

Comment 2 Junaid 2011-04-05 08:00:53 UTC

*** This bug has been marked as a duplicate of bug 2649 ***