|
|
a3470f |
From 1eb5f1a725cc9afdd7b1a7b29cf446b9c60974c6 Mon Sep 17 00:00:00 2001
|
|
|
a3470f |
From: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
a3470f |
Date: Tue, 8 May 2018 14:52:04 +0530
|
|
|
a3470f |
Subject: [PATCH 260/260] dht: Avoid dict log flooding for internal MDS xattr
|
|
|
a3470f |
|
|
|
a3470f |
Problem: Before populate MDS internal xattr first dht checks if MDS is
|
|
|
a3470f |
present in xattr or not.If xattr dictionary is NULL dict_get
|
|
|
a3470f |
log the message either dict or key is NULL
|
|
|
a3470f |
|
|
|
a3470f |
Solution: Before call dict_get check xattr, if it is NULL then no
|
|
|
a3470f |
need to call dict_get.
|
|
|
a3470f |
|
|
|
a3470f |
> BUG: 1575910
|
|
|
a3470f |
> Change-Id: I81604ec5945b85eba14b42f4583d06ec713028f4
|
|
|
a3470f |
> fixes: bz#1575910
|
|
|
a3470f |
> (cherry picked from commit ed5a09e4aea7f64f9a43698955e24285a936f0c0)
|
|
|
a3470f |
> (Upstream link https://review.gluster.org/#/c/19981/)
|
|
|
a3470f |
|
|
|
a3470f |
BUG: 1575895
|
|
|
a3470f |
Change-Id: I728a8068786f94d3793a91cdd5c64f813d7545ca
|
|
|
a3470f |
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
a3470f |
Reviewed-on: https://code.engineering.redhat.com/gerrit/138205
|
|
|
a3470f |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
a3470f |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
a3470f |
---
|
|
|
a3470f |
xlators/cluster/dht/src/dht-common.c | 2 +-
|
|
|
a3470f |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
a3470f |
|
|
|
a3470f |
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
|
|
|
a3470f |
index 3b8ba6d..a985481 100644
|
|
|
a3470f |
--- a/xlators/cluster/dht/src/dht-common.c
|
|
|
a3470f |
+++ b/xlators/cluster/dht/src/dht-common.c
|
|
|
a3470f |
@@ -855,7 +855,7 @@ dht_common_mark_mdsxattr (call_frame_t *frame, int *errst, int mark_during_fresh
|
|
|
a3470f |
and wind a setxattr call on hashed subvol to update
|
|
|
a3470f |
internal xattr
|
|
|
a3470f |
*/
|
|
|
a3470f |
- if (!dict_get (local->xattr, conf->mds_xattr_key)) {
|
|
|
a3470f |
+ if (!local->xattr || !dict_get (local->xattr, conf->mds_xattr_key)) {
|
|
|
a3470f |
/* It means no internal MDS xattr has been set yet
|
|
|
a3470f |
*/
|
|
|
a3470f |
/* Check the status of all subvol are up while call
|
|
|
a3470f |
--
|
|
|
a3470f |
1.8.3.1
|
|
|
a3470f |
|