|
|
9f5ccc |
From 659bd2a0fde9ba0cb8fc3905bcdb63d91e3dfa9d Mon Sep 17 00:00:00 2001
|
|
|
9f5ccc |
From: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
9f5ccc |
Date: Tue, 2 Jul 2019 16:50:23 -0400
|
|
|
9f5ccc |
Subject: [PATCH 319/335] features/snapview-server: obtain the list of
|
|
|
9f5ccc |
snapshots inside the lock
|
|
|
9f5ccc |
|
|
|
9f5ccc |
The current list of snapshots from priv->dirents is obtained outside
|
|
|
9f5ccc |
the lock.
|
|
|
9f5ccc |
|
|
|
9f5ccc |
Upstream patch:
|
|
|
9f5ccc |
> Change-Id: I8876ec0a38308da5db058397382fbc82cc7ac177
|
|
|
9f5ccc |
> Fixes: bz#1726783
|
|
|
9f5ccc |
> Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
9f5ccc |
> patch: https://review.gluster.org/#/c/glusterfs/+/22990/
|
|
|
9f5ccc |
|
|
|
9f5ccc |
BUG: 1731513
|
|
|
9f5ccc |
Change-Id: I8876ec0a38308da5db058397382fbc82cc7ac177
|
|
|
9f5ccc |
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
9f5ccc |
Reviewed-on: https://code.engineering.redhat.com/gerrit/185838
|
|
|
9f5ccc |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
9f5ccc |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
9f5ccc |
---
|
|
|
9f5ccc |
xlators/features/snapview-server/src/snapview-server-mgmt.c | 2 +-
|
|
|
9f5ccc |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
9f5ccc |
|
|
|
9f5ccc |
diff --git a/xlators/features/snapview-server/src/snapview-server-mgmt.c b/xlators/features/snapview-server/src/snapview-server-mgmt.c
|
|
|
9f5ccc |
index bc415ef..3d64383 100644
|
|
|
9f5ccc |
--- a/xlators/features/snapview-server/src/snapview-server-mgmt.c
|
|
|
9f5ccc |
+++ b/xlators/features/snapview-server/src/snapview-server-mgmt.c
|
|
|
9f5ccc |
@@ -256,7 +256,6 @@ mgmt_get_snapinfo_cbk(struct rpc_req *req, struct iovec *iov, int count,
|
|
|
9f5ccc |
this = frame->this;
|
|
|
9f5ccc |
ctx = frame->this->ctx;
|
|
|
9f5ccc |
priv = this->private;
|
|
|
9f5ccc |
- old_dirents = priv->dirents;
|
|
|
9f5ccc |
|
|
|
9f5ccc |
if (!ctx) {
|
|
|
9f5ccc |
errno = EINVAL;
|
|
|
9f5ccc |
@@ -388,6 +387,7 @@ mgmt_get_snapinfo_cbk(struct rpc_req *req, struct iovec *iov, int count,
|
|
|
9f5ccc |
LOCK(&priv->snaplist_lock);
|
|
|
9f5ccc |
{
|
|
|
9f5ccc |
oldcount = priv->num_snaps;
|
|
|
9f5ccc |
+ old_dirents = priv->dirents;
|
|
|
9f5ccc |
for (i = 0; i < priv->num_snaps; i++) {
|
|
|
9f5ccc |
for (j = 0; j < snapcount; j++) {
|
|
|
9f5ccc |
if ((!strcmp(old_dirents[i].name, dirents[j].name)) &&
|
|
|
9f5ccc |
--
|
|
|
9f5ccc |
1.8.3.1
|
|
|
9f5ccc |
|