[Bugs] [Bug 1232199] New: Skip zero byte files when triggering signing

bugzilla at redhat.com bugzilla at redhat.com
Tue Jun 16 09:31:09 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1232199

            Bug ID: 1232199
           Summary: Skip zero byte files when triggering signing
           Product: GlusterFS
           Version: 3.7.1
         Component: bitrot
          Assignee: bugs at gluster.org
          Reporter: rabhat at redhat.com
                CC: annair at redhat.com, bugs at gluster.org,
                    nsathyan at redhat.com, rmekala at redhat.com,
                    vbellur at redhat.com, vshankar at redhat.com
        Depends On: 1224611
            Blocks: 1227206 (glusterfs-3.7.2)
      Docs Contact: bugs at gluster.org



+++ This bug was initially created as a clone of Bug #1224611 +++

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

--- Additional comment from Niels de Vos on 2015-06-02 04:20:20 EDT ---

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.

--- Additional comment from Anand Avati on 2015-06-02 08:54:35 EDT ---

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 at redhat.com)

--- Additional comment from Anand Avati on 2015-06-12 06:45:24 EDT ---

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 at redhat.com)

--- Additional comment from Anand Avati on 2015-06-15 00:47:06 EDT ---

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 at redhat.com)

--- Additional comment from Anand Avati on 2015-06-15 05:41:49 EDT ---

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 at redhat.com)

--- Additional comment from Anand Avati on 2015-06-15 23:07:24 EDT ---

COMMIT: http://review.gluster.org/10947 committed in master by Venky Shankar
(vshankar at redhat.com) 
------
commit 60b6e5d2c3442ea0f7f85374d6613cd0dd76604c
Author: Raghavendra Bhat <raghavendra at redhat.com>
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 at redhat.com>
    Reviewed-on: http://review.gluster.org/10947
    Reviewed-by: Venky Shankar <vshankar at redhat.com>
    Tested-by: Venky Shankar <vshankar at redhat.com>
    Tested-by: Gluster Build System <jenkins at build.gluster.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1224611
[Bug 1224611] Skip zero byte files when triggering signing
https://bugzilla.redhat.com/show_bug.cgi?id=1227206
[Bug 1227206] GlusterFS 3.7.2 tracker
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are the Docs Contact for the bug.


More information about the Bugs mailing list