summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-12-29 11:03:40 +0200
committerAmar Tumballi <amarts@gmail.com>2020-01-01 07:06:58 +0000
commite21a5a1b1edc5f0ddea54be3dd10869de517b9e6 (patch)
treea9730851f74bfe7fbce1a4b35dd89789fa8aa58c
parent42f484dcecd9942611396d9bd2ad3a39019b0e1f (diff)
posix-entry-ops.c: remove some tier related code
Remove TIER_LINKFILE_GFID related code from posix Tier xlator was removed, but there are some code related to it scattered around in DHT and Posix xlators. Remove some of it. Change-Id: I3a878b31ed4a045ed419f936aa1d567ded1a273f updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
-rw-r--r--libglusterfs/src/glusterfs/glusterfs.h1
-rw-r--r--xlators/storage/posix/src/posix-entry-ops.c22
-rw-r--r--xlators/storage/posix/src/posix.h4
3 files changed, 0 insertions, 27 deletions
diff --git a/libglusterfs/src/glusterfs/glusterfs.h b/libglusterfs/src/glusterfs/glusterfs.h
index fb91806..bbb66d2 100644
--- a/libglusterfs/src/glusterfs/glusterfs.h
+++ b/libglusterfs/src/glusterfs/glusterfs.h
@@ -306,7 +306,6 @@ enum gf_internal_fop_indicator {
#define DHT_SKIP_NON_LINKTO_UNLINK "unlink-only-if-dht-linkto-file"
#define TIER_SKIP_NON_LINKTO_UNLINK "unlink-only-if-tier-linkto-file"
-#define TIER_LINKFILE_GFID "tier-linkfile-gfid"
#define DHT_SKIP_OPEN_FD_UNLINK "dont-unlink-for-open-fd"
#define DHT_IATT_IN_XDATA_KEY "dht-get-iatt-in-xattr"
#define DHT_MODE_IN_XDATA_KEY "dht-get-mode-in-xattr"
diff --git a/xlators/storage/posix/src/posix-entry-ops.c b/xlators/storage/posix/src/posix-entry-ops.c
index 4d83c09..85bc7bb 100644
--- a/xlators/storage/posix/src/posix-entry-ops.c
+++ b/xlators/storage/posix/src/posix-entry-ops.c
@@ -1109,9 +1109,6 @@ posix_unlink(call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
int32_t skip_unlink = 0;
int32_t fdstat_requested = 0;
dict_t *unwind_dict = NULL;
- void *uuid = NULL;
- char uuid_str[GF_UUID_BUF_SIZE] = {0};
- char gfid_str[GF_UUID_BUF_SIZE] = {0};
gf_boolean_t get_link_count = _gf_false;
posix_inode_ctx_t *ctx = NULL;
@@ -1141,21 +1138,6 @@ posix_unlink(call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
priv = this->private;
- op_ret = dict_get_ptr(xdata, TIER_LINKFILE_GFID, &uuid);
-
- if (!op_ret && gf_uuid_compare(uuid, stbuf.ia_gfid)) {
- op_errno = ENOENT;
- op_ret = -1;
- gf_uuid_unparse(uuid, uuid_str);
- gf_uuid_unparse(stbuf.ia_gfid, gfid_str);
- gf_msg_debug(this->name, op_errno,
- "Mismatch in gfid for path "
- "%s. Aborting the unlink. loc->gfid = %s, "
- "stbuf->ia_gfid = %s",
- real_path, uuid_str, gfid_str);
- goto out;
- }
-
op_ret = dict_get_int32_sizen(xdata, DHT_SKIP_OPEN_FD_UNLINK,
&check_open_fd);
@@ -1186,10 +1168,6 @@ posix_unlink(call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
skip_unlink = posix_skip_non_linkto_unlink(
xdata, loc, DHT_SKIP_NON_LINKTO_UNLINK,
SLEN(DHT_SKIP_NON_LINKTO_UNLINK), DHT_LINKTO, &stbuf, real_path);
- skip_unlink = skip_unlink || posix_skip_non_linkto_unlink(
- xdata, loc, TIER_SKIP_NON_LINKTO_UNLINK,
- SLEN(TIER_SKIP_NON_LINKTO_UNLINK),
- TIER_LINKTO, &stbuf, real_path);
if (skip_unlink) {
op_ret = -1;
op_errno = EBUSY;
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h
index 8c4e1c0..629cd5a 100644
--- a/xlators/storage/posix/src/posix.h
+++ b/xlators/storage/posix/src/posix.h
@@ -51,10 +51,6 @@
#define ACL_BUFFER_MAX 4096 /* size of character buffer */
#define DHT_LINKTO "trusted.glusterfs.dht.linkto"
-/*
- * TIER_MODE need to be changed when we stack tiers
- */
-#define TIER_LINKTO "trusted.tier.tier-dht.linkto"
#define POSIX_GFID_HANDLE_SIZE(base_path_len) \
(base_path_len + SLEN("/") + SLEN(GF_HIDDEN_PATH) + SLEN("/") + \