summaryrefslogtreecommitdiffstats
path: root/xlators/features/snapview-server/src
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2014-12-11 11:18:03 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-12-16 05:33:44 -0800
commit466a6f37ebaaad746e2eae045ebd249e28673717 (patch)
tree5633802f3609b20fceda244d1e112fae77058efb /xlators/features/snapview-server/src
parent15edbff0a6a8c339c663717a821665f663d7c874 (diff)
uss/gluster: In SVS, check for entry-point in dict only if inode_ctx is
not available Change-Id: I990487003b712bf4aed8f54291417965f301655e BUG: 1172430 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/features/snapview-server/src')
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 5f42a996825..040f444f82f 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -509,23 +509,6 @@ svs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
}
}
- ret = dict_get_str_boolean (xdata, "entry-point", _gf_false);
- if (ret == -1) {
- gf_log (this->name, GF_LOG_DEBUG, "failed to get the "
- "entry point info");
- entry_point_key = _gf_false;
- } else {
- entry_point_key = ret;
- }
-
- if (loc->name && strlen (loc->name)) {
- /* lookup can come with the entry-point set in the dict
- * for the parent directory of the entry-point as well.
- * So consider entry_point only for named lookup
- */
- entry_point = entry_point_key;
- }
-
if (loc->parent)
parent = inode_ref (loc->parent);
else {
@@ -545,6 +528,25 @@ svs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
fs = svs_initialise_snapshot_volume (this, dirent->name, NULL);
}
+ if (xdata && !inode_ctx) {
+ ret = dict_get_str_boolean (xdata, "entry-point", _gf_false);
+ if (ret == -1) {
+ gf_log (this->name, GF_LOG_DEBUG, "failed to get the "
+ "entry point info");
+ entry_point_key = _gf_false;
+ } else {
+ entry_point_key = ret;
+ }
+
+ if (loc->name && strlen (loc->name)) {
+ /* lookup can come with the entry-point set in the dict
+ * for the parent directory of the entry-point as well.
+ * So consider entry_point only for named lookup
+ */
+ entry_point = entry_point_key;
+ }
+ }
+
if (inode_ctx && inode_ctx->type == SNAP_VIEW_ENTRY_POINT_INODE) {
/* entry-point may not be set in the dictonary.
* This can happen if snap-view client is restarted where