summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-07-12 15:21:23 +0530
committerVenky Shankar <vshankar@redhat.com>2016-08-09 22:20:22 -0700
commit1d5dfce606217d5e2e1c71f89fab5aca100620a2 (patch)
tree8e881ce87cccef45a47c366d75d1b6f1d4d7b571
parent32b5667f017e3206bd9d3b65074eecb7ddb84244 (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: 1359020 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 8c47b19fc057f08c47444ef557503e610c707128) Reviewed-on: http://review.gluster.org/14983 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@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 e0772f87d65..d50f40a860e 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
@@ -342,10 +342,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
*/