summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-07-12 15:21:23 +0530
committerVijay Bellur <vbellur@redhat.com>2016-07-22 10:21:42 -0700
commitd1ba174fb2c9f2df7dd04ad6e34eeeedbe11bbce (patch)
treee40592cbd88f07143084326692dc51f2f0ddf76f
parente1de869f168e4dadd68fb18a1be53b65cac39880 (diff)
feature/bitrot: Ignore files with sticky bit set
Backport of http://review.gluster.org/14903 Scrubber scrubs entries in backend. It is scrubbing files with sticky bit as well. This might include linkfiles which should be skipped. This patch adds the check to ignore linkfiles during scrub. Change-Id: Ic21367b37770d391326c55c659491a1e5a82335b BUG: 1359017 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 8c47b19fc057f08c47444ef557503e610c707128) Reviewed-on: http://review.gluster.org/14982 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
index 95ad847bdec..94ddeafa0ff 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
@@ -344,10 +344,18 @@ br_scrubber_scrub_begin (xlator_t *this, struct br_fsscan_entry *fsentry)
goto unref_inode;
}
+ if (IS_DHT_LINKFILE_MODE ((&iatt))) {
+ gf_msg_debug (this->name, 0, "%s is a dht sticky bit file",
+ entry->d_name);
+ ret = 0;
+ goto unref_inode;
+ }
+
/* skip updating scrub statistics for shard entries */
gf_uuid_parse (SHARD_ROOT_GFID, shard_root_gfid);
if (gf_uuid_compare (loc.pargfid, shard_root_gfid) == 0)
skip_stat = _gf_true;
+
/**
* open() an fd for subsequent opertaions
*/