summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2018-05-08 14:52:04 +0530
committerMohit Agrawal <moagrawa@redhat.com>2018-05-08 15:15:27 +0530
commited5a09e4aea7f64f9a43698955e24285a936f0c0 (patch)
treea5a54bb7ce83f1b97ca0928b8ae95c5691674ed3 /xlators/cluster
parent38fa8b983b42c7970cd5583e9b10a385a60b89dc (diff)
dht: Avoid dict log flooding for internal MDS xattr
Problem: Before populate MDS internal xattr first dht checks if MDS is present in xattr or not.If xattr dictionary is NULL dict_get log the message either dict or key is NULL Solution: Before call dict_get check xattr, if it is NULL then no need to call dict_get. BUG: 1575910 Change-Id: I81604ec5945b85eba14b42f4583d06ec713028f4 fixes: bz#1575910 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/dht-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 7a3f7eda935..9fbd5fa06c2 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -855,7 +855,7 @@ dht_common_mark_mdsxattr (call_frame_t *frame, int *errst, int mark_during_fresh
and wind a setxattr call on hashed subvol to update
internal xattr
*/
- if (!dict_get (local->xattr, conf->mds_xattr_key)) {
+ if (!local->xattr || !dict_get (local->xattr, conf->mds_xattr_key)) {
/* It means no internal MDS xattr has been set yet
*/
/* Check the status of all subvol are up while call