Bug 1184885

Summary: Quota: Build ancestry in the lookup
Product: [Community] GlusterFS Reporter: Vijaikumar Mallikarjuna <vmallika>
Component: quotaAssignee: Vijaikumar Mallikarjuna <vmallika>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, gluster-bugs, nsathyan, smohan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.0beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1203648 1222847 (view as bug list) Environment:
Last Closed: 2015-05-14 17:26:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1056085, 1186580, 1199352, 1203589, 1203648, 1222847, 1224138    

Description Vijaikumar Mallikarjuna 2015-01-22 12:05:27 UTC
Marker can fail or can account incorrect numbers when it doesn't find a ancestry for a inode.

Solution:
Current build_ancestry is done only on demand in the write/create FOPs in quota enforcer.
It is good to do this in the quota_lookup as well.

Comment 1 Anand Avati 2015-01-22 12:12:24 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 2 Anand Avati 2015-01-23 07:04:59 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup) posted (#2) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 3 Anand Avati 2015-01-28 08:59:31 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup) posted (#3) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 4 Anand Avati 2015-01-28 11:58:51 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup) posted (#4) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 5 Anand Avati 2015-02-03 05:32:14 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup) posted (#5) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 6 Anand Avati 2015-02-21 13:05:52 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup) posted (#6) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 7 Anand Avati 2015-02-27 11:55:01 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup and stat) posted (#7) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 8 Anand Avati 2015-03-18 07:02:26 UTC
REVIEW: http://review.gluster.org/9478 (Quota: Build ancestry in the lookup) posted (#8) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 9 Anand Avati 2015-03-18 13:59:58 UTC
COMMIT: http://review.gluster.org/9478 committed in master by Vijay Bellur (vbellur) 
------
commit ee7bde14cd8afa7752dbaecd72a4afe16fb7afa9
Author: vmallika <vmallika>
Date:   Thu Jan 22 17:40:44 2015 +0530

    Quota: Build ancestry in the lookup
    
    Marker can fail or can account incorrect numbers when it doesn't find a
    ancestry for a inode.
    
    Solution:
    Current build_ancestry is done only on demand in the write/create FOPs
    in quota enforcer.
    It is good to do this in the quota_lookup as well.
    
    Change-Id: I8aaf5b3e05a3ca51e7ab1eaa1b636a90f659a872
    BUG: 1184885
    Signed-off-by: vmallika <vmallika>
    Reviewed-on: http://review.gluster.org/9478
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra Bhat <raghavendra>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 11 Anand Avati 2015-03-20 08:59:58 UTC
REVIEW: http://review.gluster.org/9954 (quota: enhancement of build ancestry) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 12 Anand Avati 2015-03-20 09:10:43 UTC
REVIEW: http://review.gluster.org/9954 (quota: enhancement of build ancestry) posted (#2) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 13 Anand Avati 2015-03-20 09:17:37 UTC
REVIEW: http://review.gluster.org/9954 (quota: enhancement of build ancestry) posted (#3) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 14 Anand Avati 2015-03-20 11:28:11 UTC
REVIEW: http://review.gluster.org/9954 (quota: enhancement of build ancestry) posted (#4) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 15 Anand Avati 2015-03-24 05:30:02 UTC
REVIEW: http://review.gluster.org/9954 (quota: enhancement of build ancestry) posted (#5) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 16 Anand Avati 2015-04-01 06:38:06 UTC
REVIEW: http://review.gluster.org/9954 (quota: enhancement of build ancestry) posted (#6) for review on master by Vijay Bellur (vbellur)

Comment 17 Anand Avati 2015-04-01 06:38:47 UTC
COMMIT: http://review.gluster.org/9954 committed in master by Vijay Bellur (vbellur) 
------
commit 3d4203fe3acad47f0a29ebe094b3e427b13f363f
Author: vmallika <vmallika>
Date:   Fri Mar 20 14:25:58 2015 +0530

    quota: enhancement of build ancestry
    
    There can a small race window where marker accounting will
    be missed.
    Consider below example where NFS mount is used
    and bricks are restarted and a write operation is performed
    
    Currently:
    T1: lookup from protocol server, quota will initiate ancestry build
    T2: opendir FOP from ancestry build
    T3: write FOP from client
    T4: write_cbk
    T5: marker initiate accounting.
        There will be a problem here and txn aborts,
        because build_ancestry is not complete
        and parent not found for an inode
    T6: opendir_cbk
    T7: initiate readdirp, posix builds ancestry in readdirp
    
    
    With this patch, now calling readdirp on anonoymous fd
    during build ancestry:
    
    T1: lookup from protocol server, quota will initiate ancestry build
    T2: readirp FOP from ancestry build, posix builds ancestry in
        readdirp
    T3: write FOP from client
    T4: write_cbk
    T5: marker initiate accounting.
        No problem here as build ancestry was performed at T1
    
    
    Change-Id: I2c262c86f34f6c574940a6b8772d94f2bade9465
    BUG: 1184885
    Signed-off-by: vmallika <vmallika>
    Reviewed-on: http://review.gluster.org/9954
    Reviewed-by: Vijay Bellur <vbellur>
    Tested-by: Vijay Bellur <vbellur>

Comment 18 Niels de Vos 2015-05-14 17:26:23 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 19 Niels de Vos 2015-05-14 17:28:19 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 20 Niels de Vos 2015-05-14 17:35:15 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user