From 05da2f939c2fd23e1d488fb66ee978ae0b29fae5 Mon Sep 17 00:00:00 2001
From: Mohammed Rafi KC <rkavunga@redhat.com>
Date: Fri, 11 Aug 2017 17:50:52 +0530
Subject: [PATCH 603/604] uss/svc: Send the first lookup to the normal graph
When parent inode is not looked up before, the inode type
won't be set. In this scenario we should send the lookup
to the normal graph first.
Back port of>
Change-Id: I5d3e53f5c1c33a17be32204f3114749d9b1e6db8
BUG: 1478716
>BUG: 1480591
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
>Reviewed-on: https://review.gluster.org/18028
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: soumya k <skoduri@redhat.com>
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Change-Id: I8b6b33676c515b311f5d0f4527d9113710a5e820
Reviewed-on: https://code.engineering.redhat.com/gerrit/115487
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
xlators/features/snapview-client/src/snapview-client.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index cd63bea..7503107 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -414,13 +414,16 @@ gf_svc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
}
if (strcmp (loc->name, priv->path)) {
- if (parent_type == NORMAL_INODE) {
- subvolume = FIRST_CHILD (this);
- local->subvolume = subvolume;
- } else {
+ if (parent_type == VIRTUAL_INODE) {
subvolume = SECOND_CHILD (this);
- local->subvolume = subvolume;
+ } else {
+ /*
+ * Either parent type is normal graph, or the parent
+ * type is uncertain.
+ */
+ subvolume = FIRST_CHILD (this);
}
+ local->subvolume = subvolume;
} else {
subvolume = SECOND_CHILD (this);
local->subvolume = subvolume;
--
1.8.3.1