diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2013-12-27 12:41:58 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-04-28 09:40:54 -0700 |
commit | 115b4093a44f6e23c28e5a382f82e72ddf73d97c (patch) | |
tree | f1c3f690a1fce1599497e2e87bb022959629482f | |
parent | 125e33d9de15908fce8849d875581e738e30cbad (diff) |
cluster/afr: get virtual-xattrs only on valid xdata.
Change-Id: I61fd891435faced25b2bdf617ec07a8af8ef057d
BUG: 1046853
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6605
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 953df5a67a4..4b39ff6039d 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2512,17 +2512,19 @@ afr_lookup (call_frame_t *frame, xlator_t *this, /* By default assume ENOTCONN. On success it will be set to 0. */ local->op_errno = ENOTCONN; - ret = dict_get_int32 (xattr_req, "attempt-self-heal", - &local->attempt_self_heal); - dict_del (xattr_req, "attempt-self-heal"); + if (xattr_req) { + ret = dict_get_int32 (xattr_req, "attempt-self-heal", + &local->attempt_self_heal); + dict_del (xattr_req, "attempt-self-heal"); - ret = dict_get_int32 (xattr_req, "foreground-self-heal", - &local->foreground_self_heal); - dict_del (xattr_req, "foreground-self-heal"); + ret = dict_get_int32 (xattr_req, "foreground-self-heal", + &local->foreground_self_heal); + dict_del (xattr_req, "foreground-self-heal"); - ret = dict_get_int32 (xattr_req, "dry-run-self-heal", - &local->self_heal.dry_run); - dict_del (xattr_req, "dry-run-self-heal"); + ret = dict_get_int32 (xattr_req, "dry-run-self-heal", + &local->self_heal.dry_run); + dict_del (xattr_req, "dry-run-self-heal"); + } ret = afr_lookup_xattr_req_prepare (local, this, xattr_req, &local->loc, &gfid_req); |