summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2015-06-26 11:53:11 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-07-01 03:55:44 -0700
commit1701239a4ef34c1780e2aa9cbc2843626bf61e2f (patch)
tree6aea79abb734fe81aaa2c75c96a978d614f53186 /xlators/cluster/dht/src/dht-common.h
parentd56b2eecbb7067f11c88d94cc87335040bbad0a3 (diff)
cluster/dht: use refcount to manage memory used to store migration
information. Without refcounting, we might free up memory while other fops are still accessing it. BUG: 1235927 Change-Id: Ia4fa4a651cd6fe2394a0c20cef83c8d2cbc8750f Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/11418 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index ad3bd0cd9d6..16e63f36644 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -15,6 +15,7 @@
#include "dht-messages.h"
#include "libxlator.h"
#include "syncop.h"
+#include "refcount.h"
#ifndef _DHT_H
#define _DHT_H
@@ -501,6 +502,7 @@ struct dir_dfmeta {
typedef struct dht_migrate_info {
xlator_t *src_subvol;
xlator_t *dst_subvol;
+ GF_REF_DECL;
} dht_migrate_info_t;
#define ENTRY_MISSING(op_ret, op_errno) (op_ret == -1 && op_errno == ENOENT)