Bug 1240918
Summary: | Quota: After rename operation , gluster v quota <volname> list-objects command give incorrect no. of files in output | |||
---|---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Anil Shah <ashah> | |
Component: | quota | Assignee: | Vijaikumar Mallikarjuna <vmallika> | |
Status: | CLOSED ERRATA | QA Contact: | Anil Shah <ashah> | |
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rhgs-3.1 | CC: | annair, asrivast, bmohanra, byarlaga, mselvaga, rgowdapp, rhs-bugs, sankarshan, smohan, storage-qa-internal, vmallika | |
Target Milestone: | --- | Keywords: | ZStream | |
Target Release: | RHGS 3.1.2 | |||
Hardware: | x86_64 | |||
OS: | All | |||
Whiteboard: | ||||
Fixed In Version: | glusterfs-3.7.5-0.3 | Doc Type: | Bug Fix | |
Doc Text: |
On a quota enabled volume, after rename operation, 'gluster v quota <VOLNAME> list-objects' command gave the incorrect number of files in the output. With the fix, it lists the correct output even after a rename operation.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1240991 (view as bug list) | Environment: | ||
Last Closed: | 2016-03-01 05:28:39 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: | 1023396 | |||
Bug Blocks: | 1223636, 1240991, 1255244, 1260783 |
Description
Anil Shah
2015-07-08 06:40:59 UTC
*** Bug 1250361 has been marked as a duplicate of this bug. *** Here are the problems with marker rename: Problem 1) 1) mq_reduce_parent_size is not handling inode-quota contribution 2) When dest files exists and IO is happening Now renaming will overwrite existing file mq_reduce_parent_size called on dest file with saved contribution, this can be a problem is IO is still happening contribution might have changed Problem 2) There is a small race between rename and in-progress write Consider below scenario 1) rename FOP invoked on file 'x' 2) write is still in progress for file 'x' 3) rename takes a lock on old-parent 4) write-update txn blocked on old-parent to acquire lock 5) in rename_cbk, contri xattrs are removed and contribution is deleted and lock is released 6) now write-update txn gets the lock and updates the wrong parent as it was holding lock on old parent so validate parent once the lock is acquired Problem 3) when a rename operation is performed, a lock is held on old parent. This lock is release before unwinding the rename operation. This can be a problem if there are in-progress writes happening during rename, where update txn can take a lock and update the old parent as inode table is not updated with new parent Able to reproduce bugs on latest build glusterfs-3.7.1-13. Files on mount point [root@rhsqa7 fuse]# ll | wc -l 1999 list-objects before rename operations [root@darkknight ~]# gluster v quota testvol list-objects Path Hard-limit Soft-limit Files Dirs Available Soft-limit exceeded? Hard-limit exceeded? --------------------------------------------------------------------------------------------------------------------------------------------- / 2000 80% 1998 3 0 Yes Yes list-objects after rename operations [root@darkknight ~]# gluster v quota testvol list-objects Path Hard-limit Soft-limit Files Dirs Available Soft-limit exceeded? Hard-limit exceeded? --------------------------------------------------------------------------------------------------------------------------------------------- / 2000 80% 2872 3 0 Yes Yes DHT linkto were also accounted, hecce inode-count was shown incorrect. Upstream patch 'http://review.gluster.org/#/c/12113/' fixes the issue upstream patch: http://review.gluster.org/#/c/12113/ release-3.7 patch: http://review.gluster.org/#/c/12204/ This is fixed as part of re-base from 3.7.5 Before Rename [root@localhost newtest]# gluster v quota testvol list-object Path Hard-limit Soft-limit Files Dirs Available Soft-limit exceeded? Hard-limit exceeded? ----------------------------------------------------------------------------------------------------------------------------------------------- / 500 80%(400) 496 4 0 Yes Yes /test 1000 80%(800) 496 1 503 No No After Rename [root@localhost newtest]# gluster v quota testvol list-object Path Hard-limit Soft-limit Files Dirs Available Soft-limit exceeded? Hard-limit exceeded? ----------------------------------------------------------------------------------------------------------------------------------------------- / 500 80%(400) 496 4 0 Yes Yes /test 1000 80%(800) 496 1 503 Bug verified on build glusterfs-3.7.5-6.el7rhgs.x86_64 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0193.html |