Bug 1224611 - Skip zero byte files when triggering signing
Summary: Skip zero byte files when triggering signing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: bitrot
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
bugs@gluster.org
URL:
Whiteboard:
Depends On:
Blocks: 1232199
TreeView+ depends on / blocked
 
Reported: 2015-05-25 06:40 UTC by Venky Shankar
Modified: 2016-06-16 13:04 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1232199 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:04:41 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Venky Shankar 2015-05-25 06:40:32 UTC
Description of problem:
commit c93c433 introduces signing of objects during write/truncate [first modification]. This avoids signing files which were never modified after creation.

But, bitrot daemon sapwns a filesystem crawler (one top-down scan of the filesystem) that triggers signing of files which may have got missed in the last run (due to disabling bitrot and other scenarios). Triggering signing does not take into account the file size and hence triggers signing for empty files.

Fix: The "oneshot" crawler needs to take into account the file size to counter this issue. Moreover, this check needs to be done *only* when an object has no bitrot extended attributed (version and signature). This check is required to handle truncates.

Although harmless, this situation can be avoided with some minor modifications.

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

How reproducible:
always

Steps to Reproduce:
1. Create a Gluster volume and enable bitrot
2. create some empty files
3. before the files can be signed restart bitrot daemon

Actual results:
Empty files are signed

Expected results:
Since bitrot daemon signs files only on modification, empty files need not be signed.

Additional info:
None

Comment 1 Niels de Vos 2015-06-02 08:20:20 UTC
The required changes to fix this bug have not made it into glusterfs-3.7.1. This bug is now getting tracked for glusterfs-3.7.2.

Comment 2 Anand Avati 2015-06-02 12:54:35 UTC
REVIEW: http://review.gluster.org/10947 (features/bit-rot: check for both inmemory and ondisk staleness) posted (#2) for review on master by Raghavendra Bhat (raghavendra)

Comment 3 Anand Avati 2015-06-12 10:45:24 UTC
REVIEW: http://review.gluster.org/10947 (features/bit-rot: check for both inmemory and ondisk staleness) posted (#3) for review on master by Venky Shankar (vshankar)

Comment 4 Anand Avati 2015-06-15 04:47:06 UTC
REVIEW: http://review.gluster.org/10947 (features/bit-rot: check for both inmemory and ondisk staleness) posted (#4) for review on master by Venky Shankar (vshankar)

Comment 5 Anand Avati 2015-06-15 09:41:49 UTC
REVIEW: http://review.gluster.org/10947 (features/bit-rot: check for both inmemory and ondisk staleness) posted (#5) for review on master by Raghavendra Bhat (raghavendra)

Comment 6 Anand Avati 2015-06-16 03:07:24 UTC
COMMIT: http://review.gluster.org/10947 committed in master by Venky Shankar (vshankar) 
------
commit 60b6e5d2c3442ea0f7f85374d6613cd0dd76604c
Author: Raghavendra Bhat <raghavendra>
Date:   Wed May 27 17:00:36 2015 +0530

    features/bit-rot: check for both inmemory and ondisk staleness
    
    * Let bit-rot stub check both on disk ongoing version, signed version xattrs and
      the in memory flags in the inode and then decide whether the inode is stale or
      not. This information is used by one shot crawler in BitD to decide whether to
      trigger the sign for the object or skip it.
    
      NOTE: The above check should be done only for BitD. For scrubber its still the
            old way of comparing on disk ongoing version with signed version.
    
    * BitD's one shot crawler should not sign zero byte objects if they do not contain
      signature. (Means the object was just created and nothing was written to it).
    
    Change-Id: I6941aefc2981bf79a6aeb476e660f79908e165a8
    BUG: 1224611
    Signed-off-by: Raghavendra Bhat <raghavendra>
    Reviewed-on: http://review.gluster.org/10947
    Reviewed-by: Venky Shankar <vshankar>
    Tested-by: Venky Shankar <vshankar>
    Tested-by: Gluster Build System <jenkins.com>

Comment 7 Niels de Vos 2015-06-20 10:08:33 UTC
Unfortunately glusterfs-3.7.2 did not contain a code change that was associated with this bug report. This bug is now proposed to be a blocker for glusterfs-3.7.3.

Comment 8 Kaushal 2015-07-27 18:25:39 UTC
This bug has been filed on the master branch and the change has already been merged into master. This bug shouldn't be blocking 3.7.x releases. Removing the `glusterfs-3.7.3` block.

Comment 9 Nagaprasad Sathyanarayana 2015-10-25 14:55:59 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 10 Niels de Vos 2016-06-16 13:04:41 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.