From a7f6ad0c617a36414c8232cb692471703923b16d Mon Sep 17 00:00:00 2001 From: Xavi Hernandez Date: Tue, 19 Jan 2021 18:03:33 +0100 Subject: [PATCH 556/584] dht: don't ignore xdata in fgetxattr DHT was passing NULL for xdata in fgetxattr() request, ignoring any data sent by upper xlators. This patch fixes the issue by sending the received xdata to lower xlators, as it's currently done for getxattr(). Backport of: > Upstream-patch: https://github.com/gluster/glusterfs/pull/2020 > Fixes: #1991 > Change-Id: If3d3f1f2ce6215f3b1acc46480e133cb4294eaec > Signed-off-by: Xavi Hernandez BUG: 1919132 Change-Id: If3d3f1f2ce6215f3b1acc46480e133cb4294eaec Signed-off-by: Xavi Hernandez Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/244538 Tested-by: RHGS Build Bot Reviewed-by: Sunil Kumar Heggodu Gopala Acharya --- xlators/cluster/dht/src/dht-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 7425c1a..0773092 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -5262,7 +5262,7 @@ dht_fgetxattr(call_frame_t *frame, xlator_t *this, fd_t *fd, const char *key, if (!ret && key && local->mds_subvol && dht_match_xattr(key)) { STACK_WIND(frame, dht_mds_getxattr_cbk, local->mds_subvol, - local->mds_subvol->fops->fgetxattr, fd, key, NULL); + local->mds_subvol->fops->fgetxattr, fd, key, xdata); return 0; } @@ -5274,7 +5274,7 @@ dht_fgetxattr(call_frame_t *frame, xlator_t *this, fd_t *fd, const char *key, for (i = 0; i < cnt; i++) { subvol = layout->list[i].xlator; STACK_WIND(frame, dht_getxattr_cbk, subvol, subvol->fops->fgetxattr, fd, - key, NULL); + key, xdata); } return 0; -- 1.8.3.1