Bug 1308961 - [New] - quarantine folder becomes empty and bitrot status does not list any files which are corrupted
Summary: [New] - quarantine folder becomes empty and bitrot status does not list any ...
Alias: None
Product: GlusterFS
Classification: Community
Component: bitrot
Version: mainline
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
Depends On: 1306907
Blocks: 1299184 glusterfs-3.7.9 1313131 1313923
TreeView+ depends on / blocked
Reported: 2016-02-16 15:07 UTC by Venky Shankar
Modified: 2016-06-16 13:57 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1306907
: 1313131 1313923 (view as bug list)
Last Closed: 2016-06-16 13:57:48 UTC
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:

Attachments (Terms of Use)

Comment 2 Kotresh HR 2016-02-18 09:31:36 UTC
Description of problem:
quarantine folder becomes empty and bitrot status does not display anything.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a volume dist-rep volume
2. Enable bitrot and quota on the volume
3. Mount the volume using fuse and create 100 1GB files using dd.
4. corrupt some files from backend so that scrubber will mark them as bad.
5. Once scrubber scrubs the files run the command "gluster vol bitrot <vol_name> scrub status" command to see the corrupted files.
4. In the mount point perform linux untar and rm -rf <linuxuntar> in a continuous loop.

Actual results:
After sometime scrub status does not list the files which were corrupted.

Expected results:
scrub status should always list the files which were corrupted.

Comment 3 Vijay Bellur 2016-02-18 15:15:17 UTC
REVIEW: http://review.gluster.org/13472 (features/bitrot: do not remove the quarantine handle in forget) posted (#1) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 4 Vijay Bellur 2016-02-18 19:14:25 UTC
REVIEW: http://review.gluster.org/13472 (features/bitrot: do not remove the quarantine handle in forget) posted (#2) for review on master by Kotresh HR (khiremat@redhat.com)

Comment 5 Vijay Bellur 2016-03-01 03:19:04 UTC
COMMIT: http://review.gluster.org/13472 committed in master by Venky Shankar (vshankar@redhat.com) 
commit 2102010edab355ac9882eea41a46edaca8b9d02c
Author: Raghavendra Bhat <raghavendra@redhat.com>
Date:   Tue Feb 16 20:22:36 2016 -0500

    features/bitrot: do not remove the quarantine handle in forget
    If an object is marked as bad, then an entry is corresponding to the
    bad object is created in the .glusterfs/quarantine directory to help
    scrub status. The entry name is the gfid of the corrupted object.
    The quarantine handle is removed in below 2 cases.
    1) When protocol/server revceives the -ve lookup on an entry whose inode
       is there in the inode table (it can happen when the corrupted object
       is deleted directly from the backend for recovery purpose) it sends a
       forget on the inode and bit-rot-stub removes the quarantine handle in
       upon getting the forget.
       refer to the below commit
    2) When bit-rot-stub itself realizes that lookup on a corrupted object
       has failed with ENOENT.
    But with step1, there is a problem when the bit-rot-stub receives forget
    due to lru limit exceeding in the inode table. In such cases, though the
    corrupted object is not deleted (either from the mount point or from the
    backend), the handle in the quarantine directory is removed and that object
    is not shown in the bad objects list in the scrub status command.
    So it is better to follow only 2nd step (i.e. bit-rot-stub removing the handle
    from the quarantine directory in -ve lookups). Also the handle has to be removed
    when a corrupted object is unlinked from the mount point itself.
    Change-Id: Ibc3bbaf4bc8a5f8986085e87b729ab912cbf8cf9
    BUG: 1308961
    Original author: Raghavendra Bhat <raghavendra@redhat.com>
    Signed-off-by: Kotresh HR <khiremat@redhat.com>
    Reviewed-on: http://review.gluster.org/13472
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Venky Shankar <vshankar@redhat.com>

Comment 6 Niels de Vos 2016-06-16 13:57:48 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

Note You need to log in before you can comment on or make changes to this bug.