Bug 1322489

Summary: marker: account goes bad with rm -rf
Product: [Community] GlusterFS Reporter: Vijaikumar Mallikarjuna <vmallika>
Component: quotaAssignee: Manikandan <mselvaga>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, smohan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-16 14:02:34 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:

Description Vijaikumar Mallikarjuna 2016-03-30 14:48:49 UTC
If there are any directories with dirty flag set previously and in the subsequent txn, if it fails to find parent inode
then we try to clear dirty status flag on a NULL inode.

We get below error:

[2016-03-29 22:50:42.692498] E [marker-quota-helper.c:319:mq_inode_ctx_get] (-->/usr/lib64/glusterfs/3.7.1/xlator/features/marker.so(mq_synctask1+0x9c) [0x7f8615d9926c] -->/usr/lib64/glusterfs/3.7.1/xlator/features/marker.so(mq_initiate_quota_task+0x320) [0x7f8615d9c6b0] -->/usr/lib64/glusterfs/3.7.1/xlator/features/marker.so(mq_inode_ctx_get+0xbe) [0x7f8615da3eee] ) 0-marker: invalid argument: inode [Invalid argument]

Comment 1 Vijay Bellur 2016-03-30 14:49:36 UTC
REVIEW: http://review.gluster.org/13857 (marker: fix marker 'inode: invalid argument' error) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 2 Vijay Bellur 2016-03-30 14:59:23 UTC
REVIEW: http://review.gluster.org/13857 (marker: fix marker 'inode: invalid argument' error) posted (#2) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 3 Vijay Bellur 2016-03-31 01:56:36 UTC
REVIEW: http://review.gluster.org/13857 (marker: fix marker 'inode: invalid argument' error) posted (#3) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 4 Vijay Bellur 2016-03-31 07:08:48 UTC
REVIEW: http://review.gluster.org/13857 (marker: fix marker 'inode: invalid argument' error) posted (#4) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 5 Vijaikumar Mallikarjuna 2016-03-31 11:38:41 UTC
We see error mentioned in the bug description when "rm -rf" is performed

Also quota accounting goes bad

Comment 6 Vijay Bellur 2016-03-31 11:40:22 UTC
REVIEW: http://review.gluster.org/13857 (marker: do mq_reduce_parent_size_txn in FG for unlink & rmdir) posted (#5) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 7 Vijay Bellur 2016-03-31 11:50:19 UTC
REVIEW: http://review.gluster.org/13857 (marker: do mq_reduce_parent_size_txn in FG for unlink & rmdir) posted (#6) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 8 Vijaikumar Mallikarjuna 2016-03-31 11:55:32 UTC
Here is the testcase

1) create volume and enable quota
2) set inode lru limit to 1
3) from NFS mount point
       untar linux tarball
       once untar is complete
       rm -rf extracted files


quota list usage shows some higher number and doesn't match with 'du -b' output

Comment 9 Vijay Bellur 2016-03-31 12:43:23 UTC
REVIEW: http://review.gluster.org/13874 (marker: do mq_reduce_parent_size_txn in FG for unlink & rmdir) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 10 Vijay Bellur 2016-04-06 08:43:05 UTC
REVIEW: http://review.gluster.org/13874 (marker: do mq_reduce_parent_size_txn in FG for unlink & rmdir) posted (#2) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 11 Vijay Bellur 2016-04-06 12:15:07 UTC
COMMIT: http://review.gluster.org/13874 committed in master by Vijaikumar Mallikarjuna (vmallika) 
------
commit cd22b5c1a490444620c1d19ce22672ff1cd478a6
Author: vmallika <vmallika>
Date:   Wed Apr 6 14:09:50 2016 +0530

    marker: do mq_reduce_parent_size_txn in FG for unlink & rmdir
    
    * If a "rm -rf" is performed by a client, we initiate a
      marker background operation mq_reduce_parent_size_txn
      for rmdir and unlink.
    
      mq_reduce_parent_size_txn can fail when updating
      size on the ancestor directories, if these directories
      are removed during the txn as the child-parent association
      removed in the dentry list.
    
      So execute mq_reduce_parent_size_txn in foreground
      and then do the UNWIND for rmdir and unlink FOP
    
    Change-Id: Iefcdced4c6ae0dbd43f92814d0ddcd1e33825864
    BUG: 1322489
    Signed-off-by: vmallika <vmallika>
    Reviewed-on: http://review.gluster.org/13874
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Raghavendra G <rgowdapp>
    CentOS-regression: Gluster Build System <jenkins.com>

Comment 14 Niels de Vos 2016-06-16 14:02:34 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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user