diff options
| author | vmallika <vmallika@redhat.com> | 2014-12-11 11:18:03 +0530 | 
|---|---|---|
| committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-01-08 01:42:13 -0800 | 
| commit | a0e35d4f09e63fa91737c6abf40a58401590acc7 (patch) | |
| tree | e90975afbd6904d31bb71e56ca8e7cf3e9e04727 | |
| parent | 5c1c4edef11ff91a0cfc807d65233e51dd7b8beb (diff) | |
uss/gluster: In SVS, check for entry-point in dict only if inode_ctx is not available.
Change-Id: I990487003b712bf4aed8f54291417965f301655e
BUG: 1175752
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>
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/9347
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
| -rw-r--r-- | xlators/features/snapview-server/src/snapview-server.c | 36 | 
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  | 
