autobuild v3.12.2-10
Resolves: bz#1488120 bz#1565577 bz#1568297 bz#1570586 bz#1572043 Resolves: bz#1572075 bz#1575840 bz#1575877 Signed-off-by: Milind Changire <mchangir@redhat.com>
This commit is contained in:
parent
312c9bafe1
commit
6adc3cae7f
86
0261-libglusterfs-syncop-Add-syncop_entrylk.patch
Normal file
86
0261-libglusterfs-syncop-Add-syncop_entrylk.patch
Normal file
@ -0,0 +1,86 @@
|
||||
From 87fd48e99d6b3556aba0c4f1485b06334b8cc1cf Mon Sep 17 00:00:00 2001
|
||||
From: Raghavendra G <rgowdapp@redhat.com>
|
||||
Date: Wed, 9 May 2018 14:57:35 +0530
|
||||
Subject: [PATCH 261/271] libglusterfs/syncop: Add syncop_entrylk
|
||||
|
||||
>Change-Id: Idd86b9f0fa144c2316ab6276e2def28b696ae18a
|
||||
>BUG: 1543279
|
||||
>Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
||||
|
||||
upstream patch: https://review.gluster.org/#/c/19556/
|
||||
BUG: 1488120
|
||||
Change-Id: I02e546bcb012545dcdaa70ea26046db05b5032f4
|
||||
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138169
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
|
||||
---
|
||||
libglusterfs/src/syncop.c | 37 +++++++++++++++++++++++++++++++++++++
|
||||
libglusterfs/src/syncop.h | 5 +++++
|
||||
2 files changed, 42 insertions(+)
|
||||
|
||||
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
|
||||
index b36c88d..ac40a1d 100644
|
||||
--- a/libglusterfs/src/syncop.c
|
||||
+++ b/libglusterfs/src/syncop.c
|
||||
@@ -3019,6 +3019,43 @@ syncop_inodelk (xlator_t *subvol, const char *volume, loc_t *loc, int32_t cmd,
|
||||
}
|
||||
|
||||
int32_t
|
||||
+syncop_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
||||
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
|
||||
+{
|
||||
+ struct syncargs *args = NULL;
|
||||
+
|
||||
+ args = cookie;
|
||||
+ args->op_ret = op_ret;
|
||||
+ args->op_errno = op_errno;
|
||||
+ if (xdata)
|
||||
+ args->xdata = dict_ref (xdata);
|
||||
+
|
||||
+ __wake (args);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+syncop_entrylk (xlator_t *subvol, const char *volume, loc_t *loc,
|
||||
+ const char *basename, entrylk_cmd cmd, entrylk_type type,
|
||||
+ dict_t *xdata_in, dict_t **xdata_out)
|
||||
+{
|
||||
+ struct syncargs args = {0, };
|
||||
+
|
||||
+ SYNCOP (subvol, (&args), syncop_entrylk_cbk, subvol->fops->entrylk,
|
||||
+ volume, loc, basename, cmd, type, xdata_in);
|
||||
+
|
||||
+ if (xdata_out)
|
||||
+ *xdata_out = args.xdata;
|
||||
+ else if (args.xdata)
|
||||
+ dict_unref (args.xdata);
|
||||
+
|
||||
+ if (args.op_ret < 0)
|
||||
+ return -args.op_errno;
|
||||
+
|
||||
+ return args.op_ret;
|
||||
+}
|
||||
+
|
||||
+int32_t
|
||||
syncop_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
||||
int32_t op_ret, int32_t op_errno, dict_t *dict,
|
||||
dict_t *xdata)
|
||||
diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h
|
||||
index a9cdee1..5b5ad4e 100644
|
||||
--- a/libglusterfs/src/syncop.h
|
||||
+++ b/libglusterfs/src/syncop.h
|
||||
@@ -562,4 +562,9 @@ syncop_setactivelk (xlator_t *subvol, loc_t *loc,
|
||||
lock_migration_info_t *locklist, dict_t *xdata_in,
|
||||
dict_t **xdata_out);
|
||||
|
||||
+int
|
||||
+syncop_entrylk (xlator_t *subvol, const char *volume, loc_t *loc,
|
||||
+ const char *basename, entrylk_cmd cmd, entrylk_type type,
|
||||
+ dict_t *xdata_in, dict_t **xdata_out);
|
||||
+
|
||||
#endif /* _SYNCOP_H */
|
||||
--
|
||||
1.8.3.1
|
||||
|
346
0262-cluster-dht-store-the-reaction-on-failures-per-lock.patch
Normal file
346
0262-cluster-dht-store-the-reaction-on-failures-per-lock.patch
Normal file
@ -0,0 +1,346 @@
|
||||
From 2802d400934b247436edf4d9f85839ad455307ca Mon Sep 17 00:00:00 2001
|
||||
From: Raghavendra G <rgowdapp@redhat.com>
|
||||
Date: Thu, 8 Feb 2018 13:44:38 +0530
|
||||
Subject: [PATCH 262/271] cluster/dht: store the 'reaction' on failures per
|
||||
lock
|
||||
|
||||
Currently its passed in dht_blocking_inode(entry)lk, which would be a
|
||||
global value for all the locks passed in the argument. This would
|
||||
be a limitation for cases where we want to ignore failures on only few
|
||||
locks and fail for others.
|
||||
|
||||
>Change-Id: I02cfbcaafb593ad8140c0e5af725c866b630fb6b
|
||||
>BUG: 1543279
|
||||
>Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
||||
|
||||
upstream patch: https://review.gluster.org/19546/
|
||||
BUG: 1488120
|
||||
Change-Id: I2d575530d14c89f90a0ffb790810748d4e296972
|
||||
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138153
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
|
||||
---
|
||||
xlators/cluster/dht/src/dht-common.c | 11 ++++++-----
|
||||
xlators/cluster/dht/src/dht-common.h | 16 +++++++++-------
|
||||
xlators/cluster/dht/src/dht-lock.c | 27 ++++++++++++++-------------
|
||||
xlators/cluster/dht/src/dht-lock.h | 9 ++++-----
|
||||
xlators/cluster/dht/src/dht-rename.c | 8 +++++---
|
||||
xlators/cluster/dht/src/dht-selfheal.c | 13 ++++++++-----
|
||||
6 files changed, 46 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
|
||||
index a985481..5b2c897 100644
|
||||
--- a/xlators/cluster/dht/src/dht-common.c
|
||||
+++ b/xlators/cluster/dht/src/dht-common.c
|
||||
@@ -7248,7 +7248,8 @@ dht_mknod_lock (call_frame_t *frame, xlator_t *subvol)
|
||||
goto err;
|
||||
|
||||
lk_array[0] = dht_lock_new (frame->this, subvol, &local->loc, F_RDLCK,
|
||||
- DHT_LAYOUT_HEAL_DOMAIN, NULL);
|
||||
+ DHT_LAYOUT_HEAL_DOMAIN, NULL,
|
||||
+ IGNORE_ENOENT_ESTALE);
|
||||
|
||||
if (lk_array[0] == NULL)
|
||||
goto err;
|
||||
@@ -7256,8 +7257,7 @@ dht_mknod_lock (call_frame_t *frame, xlator_t *subvol)
|
||||
local->lock[0].layout.parent_layout.locks = lk_array;
|
||||
local->lock[0].layout.parent_layout.lk_count = count;
|
||||
|
||||
- ret = dht_blocking_inodelk (frame, lk_array, count,
|
||||
- IGNORE_ENOENT_ESTALE, dht_mknod_lock_cbk);
|
||||
+ ret = dht_blocking_inodelk (frame, lk_array, count, dht_mknod_lock_cbk);
|
||||
|
||||
if (ret < 0) {
|
||||
local->lock[0].layout.parent_layout.locks = NULL;
|
||||
@@ -8392,7 +8392,8 @@ dht_create_lock (call_frame_t *frame, xlator_t *subvol)
|
||||
goto err;
|
||||
|
||||
lk_array[0] = dht_lock_new (frame->this, subvol, &local->loc, F_RDLCK,
|
||||
- DHT_LAYOUT_HEAL_DOMAIN, NULL);
|
||||
+ DHT_LAYOUT_HEAL_DOMAIN, NULL,
|
||||
+ IGNORE_ENOENT_ESTALE);
|
||||
|
||||
if (lk_array[0] == NULL)
|
||||
goto err;
|
||||
@@ -8401,7 +8402,7 @@ dht_create_lock (call_frame_t *frame, xlator_t *subvol)
|
||||
local->lock[0].layout.parent_layout.lk_count = count;
|
||||
|
||||
ret = dht_blocking_inodelk (frame, lk_array, count,
|
||||
- IGNORE_ENOENT_ESTALE, dht_create_lock_cbk);
|
||||
+ dht_create_lock_cbk);
|
||||
|
||||
if (ret < 0) {
|
||||
local->lock[0].layout.parent_layout.locks = NULL;
|
||||
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
|
||||
index 9d429af..fbc1e29 100644
|
||||
--- a/xlators/cluster/dht/src/dht-common.h
|
||||
+++ b/xlators/cluster/dht/src/dht-common.h
|
||||
@@ -173,6 +173,7 @@ typedef enum {
|
||||
} qdstatfs_action_t;
|
||||
|
||||
typedef enum {
|
||||
+ REACTION_INVALID,
|
||||
FAIL_ON_ANY_ERROR,
|
||||
IGNORE_ENOENT_ESTALE
|
||||
} dht_reaction_type_t;
|
||||
@@ -187,15 +188,16 @@ struct dht_skip_linkto_unlink {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
- xlator_t *xl;
|
||||
- loc_t loc; /* contains/points to inode to lock on. */
|
||||
- short type; /* read/write lock. */
|
||||
- char *domain; /* Only locks within a single domain
|
||||
+ xlator_t *xl;
|
||||
+ loc_t loc; /* contains/points to inode to lock on. */
|
||||
+ short type; /* read/write lock. */
|
||||
+ char *domain; /* Only locks within a single domain
|
||||
* contend with each other
|
||||
*/
|
||||
- char *basename; /* Required for entrylk */
|
||||
- gf_lkowner_t lk_owner;
|
||||
- gf_boolean_t locked;
|
||||
+ char *basename; /* Required for entrylk */
|
||||
+ gf_lkowner_t lk_owner;
|
||||
+ gf_boolean_t locked;
|
||||
+ dht_reaction_type_t do_on_failure;
|
||||
} dht_lock_t;
|
||||
|
||||
/* The lock structure represents inodelk. */
|
||||
diff --git a/xlators/cluster/dht/src/dht-lock.c b/xlators/cluster/dht/src/dht-lock.c
|
||||
index 45ebeec..3e82c98 100644
|
||||
--- a/xlators/cluster/dht/src/dht-lock.c
|
||||
+++ b/xlators/cluster/dht/src/dht-lock.c
|
||||
@@ -191,7 +191,8 @@ out:
|
||||
|
||||
dht_lock_t *
|
||||
dht_lock_new (xlator_t *this, xlator_t *xl, loc_t *loc, short type,
|
||||
- const char *domain, const char *basename)
|
||||
+ const char *domain, const char *basename,
|
||||
+ dht_reaction_type_t do_on_failure)
|
||||
{
|
||||
dht_conf_t *conf = NULL;
|
||||
dht_lock_t *lock = NULL;
|
||||
@@ -204,6 +205,7 @@ dht_lock_new (xlator_t *this, xlator_t *xl, loc_t *loc, short type,
|
||||
|
||||
lock->xl = xl;
|
||||
lock->type = type;
|
||||
+ lock->do_on_failure = do_on_failure;
|
||||
|
||||
lock->domain = gf_strdup (domain);
|
||||
if (lock->domain == NULL) {
|
||||
@@ -540,7 +542,7 @@ dht_blocking_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
||||
switch (op_errno) {
|
||||
case ESTALE:
|
||||
case ENOENT:
|
||||
- if (local->lock[0].ns.directory_ns.reaction != IGNORE_ENOENT_ESTALE) {
|
||||
+ if (local->lock[0].ns.directory_ns.locks[lk_index]->do_on_failure != IGNORE_ENOENT_ESTALE) {
|
||||
local->lock[0].ns.directory_ns.op_ret = -1;
|
||||
local->lock[0].ns.directory_ns.op_errno = op_errno;
|
||||
goto cleanup;
|
||||
@@ -597,8 +599,7 @@ dht_blocking_entrylk_rec (call_frame_t *frame, int i)
|
||||
|
||||
int
|
||||
dht_blocking_entrylk (call_frame_t *frame, dht_lock_t **lk_array,
|
||||
- int lk_count, dht_reaction_type_t reaction,
|
||||
- fop_entrylk_cbk_t entrylk_cbk)
|
||||
+ int lk_count, fop_entrylk_cbk_t entrylk_cbk)
|
||||
{
|
||||
int ret = -1;
|
||||
call_frame_t *lock_frame = NULL;
|
||||
@@ -621,7 +622,6 @@ dht_blocking_entrylk (call_frame_t *frame, dht_lock_t **lk_array,
|
||||
dht_set_lkowner (lk_array, lk_count, &lock_frame->root->lk_owner);
|
||||
|
||||
local = lock_frame->local;
|
||||
- local->lock[0].ns.directory_ns.reaction = reaction;
|
||||
local->main_frame = frame;
|
||||
|
||||
dht_blocking_entrylk_rec (lock_frame, 0);
|
||||
@@ -1029,7 +1029,8 @@ dht_blocking_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
||||
switch (op_errno) {
|
||||
case ESTALE:
|
||||
case ENOENT:
|
||||
- if (local->lock[0].layout.my_layout.reaction != IGNORE_ENOENT_ESTALE) {
|
||||
+ if (local->lock[0].layout.my_layout.locks[lk_index]->do_on_failure
|
||||
+ != IGNORE_ENOENT_ESTALE) {
|
||||
gf_uuid_unparse (local->lock[0].layout.my_layout.locks[lk_index]->loc.gfid, gfid);
|
||||
local->lock[0].layout.my_layout.op_ret = -1;
|
||||
local->lock[0].layout.my_layout.op_errno = op_errno;
|
||||
@@ -1100,8 +1101,7 @@ dht_blocking_inodelk_rec (call_frame_t *frame, int i)
|
||||
|
||||
int
|
||||
dht_blocking_inodelk (call_frame_t *frame, dht_lock_t **lk_array,
|
||||
- int lk_count, dht_reaction_type_t reaction,
|
||||
- fop_inodelk_cbk_t inodelk_cbk)
|
||||
+ int lk_count, fop_inodelk_cbk_t inodelk_cbk)
|
||||
{
|
||||
int ret = -1;
|
||||
call_frame_t *lock_frame = NULL;
|
||||
@@ -1139,7 +1139,6 @@ dht_blocking_inodelk (call_frame_t *frame, dht_lock_t **lk_array,
|
||||
dht_set_lkowner (lk_array, lk_count, &lock_frame->root->lk_owner);
|
||||
|
||||
local = lock_frame->local;
|
||||
- local->lock[0].layout.my_layout.reaction = reaction;
|
||||
local->main_frame = frame;
|
||||
|
||||
dht_blocking_inodelk_rec (lock_frame, 0);
|
||||
@@ -1210,7 +1209,7 @@ dht_blocking_entrylk_after_inodelk (call_frame_t *frame, void *cookie,
|
||||
lk_array = entrylk->locks;
|
||||
count = entrylk->lk_count;
|
||||
|
||||
- ret = dht_blocking_entrylk (frame, lk_array, count, FAIL_ON_ANY_ERROR,
|
||||
+ ret = dht_blocking_entrylk (frame, lk_array, count,
|
||||
dht_protect_namespace_cbk);
|
||||
|
||||
if (ret < 0) {
|
||||
@@ -1303,7 +1302,8 @@ dht_protect_namespace (call_frame_t *frame, loc_t *loc,
|
||||
}
|
||||
|
||||
inodelk->locks[0] = dht_lock_new (this, subvol, &parent, F_RDLCK,
|
||||
- DHT_LAYOUT_HEAL_DOMAIN, NULL);
|
||||
+ DHT_LAYOUT_HEAL_DOMAIN, NULL,
|
||||
+ FAIL_ON_ANY_ERROR);
|
||||
if (inodelk->locks[0] == NULL) {
|
||||
local->op_errno = ENOMEM;
|
||||
gf_msg (this->name, GF_LOG_WARNING, local->op_errno,
|
||||
@@ -1330,7 +1330,8 @@ dht_protect_namespace (call_frame_t *frame, loc_t *loc,
|
||||
}
|
||||
|
||||
entrylk->locks[0] = dht_lock_new (this, subvol, &parent, F_WRLCK,
|
||||
- DHT_ENTRY_SYNC_DOMAIN, loc->name);
|
||||
+ DHT_ENTRY_SYNC_DOMAIN, loc->name,
|
||||
+ FAIL_ON_ANY_ERROR);
|
||||
if (entrylk->locks[0] == NULL) {
|
||||
local->op_errno = ENOMEM;
|
||||
gf_msg (this->name, GF_LOG_WARNING, local->op_errno,
|
||||
@@ -1347,7 +1348,7 @@ dht_protect_namespace (call_frame_t *frame, loc_t *loc,
|
||||
* on name in cbk.
|
||||
*/
|
||||
lk_array = inodelk->locks;
|
||||
- ret = dht_blocking_inodelk (frame, lk_array, count, FAIL_ON_ANY_ERROR,
|
||||
+ ret = dht_blocking_inodelk (frame, lk_array, count,
|
||||
dht_blocking_entrylk_after_inodelk);
|
||||
if (ret < 0) {
|
||||
local->op_errno = EIO;
|
||||
diff --git a/xlators/cluster/dht/src/dht-lock.h b/xlators/cluster/dht/src/dht-lock.h
|
||||
index 0557858..f36bf3f 100644
|
||||
--- a/xlators/cluster/dht/src/dht-lock.h
|
||||
+++ b/xlators/cluster/dht/src/dht-lock.h
|
||||
@@ -22,7 +22,8 @@ dht_lock_count (dht_lock_t **lk_array, int lk_count);
|
||||
|
||||
dht_lock_t *
|
||||
dht_lock_new (xlator_t *this, xlator_t *xl, loc_t *loc, short type,
|
||||
- const char *domain, const char *basename);
|
||||
+ const char *domain, const char *basename,
|
||||
+ dht_reaction_type_t do_on_failure);
|
||||
|
||||
int32_t
|
||||
dht_unlock_entrylk_wrapper (call_frame_t *, dht_elock_wrap_t *);
|
||||
@@ -32,8 +33,7 @@ dht_blocking_entrylk_rec (call_frame_t *frame, int i);
|
||||
|
||||
int
|
||||
dht_blocking_entrylk (call_frame_t *frame, dht_lock_t **lk_array,
|
||||
- int lk_count, dht_reaction_type_t reaction,
|
||||
- fop_inodelk_cbk_t entrylk_cbk);
|
||||
+ int lk_count, fop_inodelk_cbk_t entrylk_cbk);
|
||||
|
||||
int32_t
|
||||
dht_unlock_inodelk (call_frame_t *frame, dht_lock_t **lk_array, int lk_count,
|
||||
@@ -70,8 +70,7 @@ dht_blocking_inodelk_rec (call_frame_t *frame, int i);
|
||||
|
||||
int
|
||||
dht_blocking_inodelk (call_frame_t *frame, dht_lock_t **lk_array,
|
||||
- int lk_count, dht_reaction_type_t reaction,
|
||||
- fop_inodelk_cbk_t inodelk_cbk);
|
||||
+ int lk_count, fop_inodelk_cbk_t inodelk_cbk);
|
||||
|
||||
int32_t
|
||||
dht_blocking_entrylk_after_inodelk (call_frame_t *frame, void *cookie,
|
||||
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
|
||||
index 5a72c1f..3dc042e 100644
|
||||
--- a/xlators/cluster/dht/src/dht-rename.c
|
||||
+++ b/xlators/cluster/dht/src/dht-rename.c
|
||||
@@ -1649,14 +1649,16 @@ dht_rename_lock (call_frame_t *frame)
|
||||
goto err;
|
||||
|
||||
lk_array[0] = dht_lock_new (frame->this, local->src_cached, &local->loc,
|
||||
- F_WRLCK, DHT_FILE_MIGRATE_DOMAIN, NULL);
|
||||
+ F_WRLCK, DHT_FILE_MIGRATE_DOMAIN, NULL,
|
||||
+ FAIL_ON_ANY_ERROR);
|
||||
if (lk_array[0] == NULL)
|
||||
goto err;
|
||||
|
||||
if (local->dst_cached) {
|
||||
lk_array[1] = dht_lock_new (frame->this, local->dst_cached,
|
||||
&local->loc2, F_WRLCK,
|
||||
- DHT_FILE_MIGRATE_DOMAIN, NULL);
|
||||
+ DHT_FILE_MIGRATE_DOMAIN, NULL,
|
||||
+ FAIL_ON_ANY_ERROR);
|
||||
if (lk_array[1] == NULL)
|
||||
goto err;
|
||||
}
|
||||
@@ -1665,7 +1667,7 @@ dht_rename_lock (call_frame_t *frame)
|
||||
local->lock[0].layout.parent_layout.lk_count = count;
|
||||
|
||||
ret = dht_blocking_inodelk (frame, lk_array, count,
|
||||
- FAIL_ON_ANY_ERROR, dht_rename_lock_cbk);
|
||||
+ dht_rename_lock_cbk);
|
||||
if (ret < 0) {
|
||||
local->lock[0].layout.parent_layout.locks = NULL;
|
||||
local->lock[0].layout.parent_layout.lk_count = 0;
|
||||
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
|
||||
index 5812f12..e9b1db9 100644
|
||||
--- a/xlators/cluster/dht/src/dht-selfheal.c
|
||||
+++ b/xlators/cluster/dht/src/dht-selfheal.c
|
||||
@@ -588,7 +588,8 @@ dht_selfheal_layout_lock (call_frame_t *frame, dht_layout_t *layout,
|
||||
conf->subvolumes[i],
|
||||
&local->loc, F_WRLCK,
|
||||
DHT_LAYOUT_HEAL_DOMAIN,
|
||||
- NULL);
|
||||
+ NULL,
|
||||
+ FAIL_ON_ANY_ERROR);
|
||||
if (lk_array[i] == NULL) {
|
||||
gf_uuid_unparse (local->stbuf.ia_gfid, gfid);
|
||||
gf_msg (THIS->name, GF_LOG_ERROR, ENOMEM,
|
||||
@@ -613,7 +614,8 @@ dht_selfheal_layout_lock (call_frame_t *frame, dht_layout_t *layout,
|
||||
|
||||
lk_array[0] = dht_lock_new (frame->this, local->hashed_subvol,
|
||||
&local->loc, F_WRLCK,
|
||||
- DHT_LAYOUT_HEAL_DOMAIN, NULL);
|
||||
+ DHT_LAYOUT_HEAL_DOMAIN, NULL,
|
||||
+ FAIL_ON_ANY_ERROR);
|
||||
if (lk_array[0] == NULL) {
|
||||
gf_uuid_unparse (local->stbuf.ia_gfid, gfid);
|
||||
gf_msg (THIS->name, GF_LOG_ERROR, ENOMEM,
|
||||
@@ -627,7 +629,7 @@ dht_selfheal_layout_lock (call_frame_t *frame, dht_layout_t *layout,
|
||||
local->lock[0].layout.my_layout.locks = lk_array;
|
||||
local->lock[0].layout.my_layout.lk_count = count;
|
||||
|
||||
- ret = dht_blocking_inodelk (frame, lk_array, count, FAIL_ON_ANY_ERROR,
|
||||
+ ret = dht_blocking_inodelk (frame, lk_array, count,
|
||||
dht_selfheal_layout_lock_cbk);
|
||||
if (ret < 0) {
|
||||
local->lock[0].layout.my_layout.locks = NULL;
|
||||
@@ -2783,7 +2785,8 @@ dht_update_commit_hash_for_layout (call_frame_t *frame)
|
||||
lk_array[i] = dht_lock_new (frame->this,
|
||||
conf->local_subvols[i],
|
||||
&local->loc, F_WRLCK,
|
||||
- DHT_LAYOUT_HEAL_DOMAIN, NULL);
|
||||
+ DHT_LAYOUT_HEAL_DOMAIN, NULL,
|
||||
+ FAIL_ON_ANY_ERROR);
|
||||
if (lk_array[i] == NULL)
|
||||
goto err;
|
||||
}
|
||||
@@ -2791,7 +2794,7 @@ dht_update_commit_hash_for_layout (call_frame_t *frame)
|
||||
local->lock[0].layout.my_layout.locks = lk_array;
|
||||
local->lock[0].layout.my_layout.lk_count = count;
|
||||
|
||||
- ret = dht_blocking_inodelk (frame, lk_array, count, FAIL_ON_ANY_ERROR,
|
||||
+ ret = dht_blocking_inodelk (frame, lk_array, count,
|
||||
dht_update_commit_hash_for_layout_resume);
|
||||
if (ret < 0) {
|
||||
local->lock[0].layout.my_layout.locks = NULL;
|
||||
--
|
||||
1.8.3.1
|
||||
|
110
0263-server-resolver-don-t-trust-inode-table-for-RESOLVE_.patch
Normal file
110
0263-server-resolver-don-t-trust-inode-table-for-RESOLVE_.patch
Normal file
@ -0,0 +1,110 @@
|
||||
From 90092b0c276f599bbe415ecc3051ca12d99461b6 Mon Sep 17 00:00:00 2001
|
||||
From: Raghavendra G <rgowdapp@redhat.com>
|
||||
Date: Sat, 17 Mar 2018 13:16:59 +0530
|
||||
Subject: [PATCH 263/271] server/resolver: don't trust inode-table for
|
||||
RESOLVE_NOT
|
||||
|
||||
There have been known races between fops which add a dentry (like
|
||||
lookup, create, mknod etc) and fops that remove a dentry (like rename,
|
||||
unlink, rmdir etc) due to which stale dentries are left out in inode
|
||||
table even though the dentry doesn't exist on backend. For eg.,
|
||||
consider a lookup (parent/bname) and unlink (parent/bname) racing in
|
||||
the following order:
|
||||
|
||||
* lookup hits storage/posix and finds that dentry exists
|
||||
* unlink removes the dentry on storage/posix
|
||||
* unlink reaches protocol/server where the dentry (parent/bname) is
|
||||
unlinked from the inode
|
||||
* lookup reaches protocol/server and creates a dentry (parent/bname)
|
||||
on the inode
|
||||
|
||||
Now we've a stale dentry (parent/bname) associated with the inode in
|
||||
itable. This situation is bad for fops like link, create etc which
|
||||
invoke resolver with type RESOLVE_NOT. These fops fail with EEXIST
|
||||
even though there is no such dentry on backend fs. This issue can be
|
||||
solved in two ways:
|
||||
|
||||
* Enable "dentry fop serializer" xlator [1].
|
||||
# gluster volume set features.sdfs on
|
||||
|
||||
* Make sure resolver does a lookup on backend when it finds a dentry
|
||||
in itable and validates the state of itable.
|
||||
- If a dentry is not found, unlink those stale dentries from itable
|
||||
and continue with fop
|
||||
- If dentry is found, fail the fop with EEXIST
|
||||
|
||||
This patch implements second solution as sdfs is not enabled by
|
||||
default in brick xlator stack. Once sdfs is enabled by default, this
|
||||
patch can be reverted.
|
||||
|
||||
[1] https://github.com/gluster/glusterfs/issues/397
|
||||
|
||||
>Change-Id: Ia8bb0cf97f97cb0e72639bce8aadb0f6d3f4a34a
|
||||
>updates: bz#1543279
|
||||
>BUG: 1543279
|
||||
>Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
||||
|
||||
upstream patch: https://review.gluster.org/19732
|
||||
BUG: 1488120
|
||||
Change-Id: I78df4f6751e5db1fc659ee15d92b76d1486455f0
|
||||
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138152
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
|
||||
---
|
||||
xlators/protocol/server/src/server-resolve.c | 27 +++++++++++++++++++++++----
|
||||
1 file changed, 23 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
|
||||
index d0126aa..6ffb909 100644
|
||||
--- a/xlators/protocol/server/src/server-resolve.c
|
||||
+++ b/xlators/protocol/server/src/server-resolve.c
|
||||
@@ -58,10 +58,27 @@ resolve_gfid_entry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
||||
|
||||
if (op_ret == -1) {
|
||||
if (op_errno == ENOENT) {
|
||||
- gf_msg_debug (this->name, 0, "%s/%s: failed to resolve"
|
||||
- " (%s)",
|
||||
+ gf_msg_debug (this->name, 0,
|
||||
+ "%s/%s: failed to resolve (%s)",
|
||||
uuid_utoa (resolve_loc->pargfid),
|
||||
resolve_loc->name, strerror (op_errno));
|
||||
+ if (resolve->type == RESOLVE_NOT) {
|
||||
+ do {
|
||||
+ inode = inode_grep (state->itable,
|
||||
+ resolve_loc->parent,
|
||||
+ resolve->bname);
|
||||
+
|
||||
+ if (inode) {
|
||||
+ gf_msg_debug (this->name, 0, "%s/%s: "
|
||||
+ "removing stale dentry",
|
||||
+ uuid_utoa (resolve_loc->pargfid),
|
||||
+ resolve->bname);
|
||||
+ inode_unlink (inode,
|
||||
+ resolve_loc->parent,
|
||||
+ resolve->bname);
|
||||
+ }
|
||||
+ } while (inode);
|
||||
+ }
|
||||
} else {
|
||||
gf_msg (this->name, GF_LOG_WARNING, op_errno,
|
||||
PS_MSG_GFID_RESOLVE_FAILED, "%s/%s: failed to "
|
||||
@@ -318,11 +335,13 @@ resolve_entry_simple (call_frame_t *frame)
|
||||
|
||||
if (resolve->type == RESOLVE_NOT) {
|
||||
gf_msg_debug (this->name, 0, "inode (pointer: %p gfid:%s found"
|
||||
- " for path (%s) while type is RESOLVE_NOT",
|
||||
+ " for path (%s) while type is RESOLVE_NOT. "
|
||||
+ "Performing lookup on backend to rule out any "
|
||||
+ "possible stale dentries in inode table",
|
||||
inode, uuid_utoa (inode->gfid), resolve->path);
|
||||
resolve->op_ret = -1;
|
||||
resolve->op_errno = EEXIST;
|
||||
- ret = -1;
|
||||
+ ret = 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
1201
0264-cluster-dht-fixes-to-parallel-renames-to-same-destin.patch
Normal file
1201
0264-cluster-dht-fixes-to-parallel-renames-to-same-destin.patch
Normal file
File diff suppressed because it is too large
Load Diff
47
0265-Glusterfsd-brick-crash-during-get-state.patch
Normal file
47
0265-Glusterfsd-brick-crash-during-get-state.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From 9efbf3a9fb009706ca71068449a961ee0237a705 Mon Sep 17 00:00:00 2001
|
||||
From: hari gowtham <hgowtham@redhat.com>
|
||||
Date: Tue, 8 May 2018 11:42:33 +0530
|
||||
Subject: [PATCH 265/271] Glusterfsd: brick crash during get-state
|
||||
|
||||
back-port of: https://review.gluster.org/#/c/19977/
|
||||
|
||||
The xprt's dereferencing wasn't checked before using it for the
|
||||
strcmp, which caused the segfault and crashed the brick process.
|
||||
|
||||
fix: Check every deferenced variable before using it.
|
||||
|
||||
>Change-Id: I7f705d1c88a124e8219bb877156fadb17ecf11c3
|
||||
>fixes: bz#1575864
|
||||
>Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
||||
|
||||
Change-Id: I7f705d1c88a124e8219bb877156fadb17ecf11c3
|
||||
BUG: 1572075
|
||||
Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138650
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
xlators/protocol/server/src/server.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
|
||||
index 6f20a06..2ba5da3 100644
|
||||
--- a/xlators/protocol/server/src/server.c
|
||||
+++ b/xlators/protocol/server/src/server.c
|
||||
@@ -245,8 +245,11 @@ server_priv_to_dict (xlator_t *this, dict_t *dict, char *brickname)
|
||||
pthread_mutex_lock (&conf->mutex);
|
||||
{
|
||||
list_for_each_entry (xprt, &conf->xprt_list, list) {
|
||||
- if (!strcmp (brickname,
|
||||
- xprt->xl_private->bound_xl->name)) {
|
||||
+ if ((xprt) && (xprt->xl_private) &&
|
||||
+ (xprt->xl_private->bound_xl) &&
|
||||
+ (xprt->xl_private->bound_xl->name) && (brickname) &&
|
||||
+ (!strcmp (brickname,
|
||||
+ xprt->xl_private->bound_xl->name))) {
|
||||
peerinfo = &xprt->peerinfo;
|
||||
memset (key, 0, sizeof (key));
|
||||
snprintf (key, sizeof (key),
|
||||
--
|
||||
1.8.3.1
|
||||
|
42
0266-glusterd-geo-rep-Fix-glusterd-crash.patch
Normal file
42
0266-glusterd-geo-rep-Fix-glusterd-crash.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 7a2bf65414368999295993cdbbee4060ca495951 Mon Sep 17 00:00:00 2001
|
||||
From: Kotresh HR <khiremat@redhat.com>
|
||||
Date: Mon, 7 May 2018 06:35:25 -0400
|
||||
Subject: [PATCH 266/271] glusterd/geo-rep: Fix glusterd crash
|
||||
|
||||
Using strdump instead of gf_strdup crashes
|
||||
during free if mempool is being used.
|
||||
gf_free checks the magic number in the
|
||||
header which will not be taken care if
|
||||
strdup is used.
|
||||
|
||||
Uptream reference:
|
||||
> fixes: bz#1576392
|
||||
> Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e
|
||||
> Patch: https://review.gluster.org/19993
|
||||
|
||||
BUG: 1570586
|
||||
Change-Id: Iab36496554b838a036af9d863e3f5fd07fd9780e
|
||||
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138670
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
|
||||
index dff8065..a1251ae 100644
|
||||
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
|
||||
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
|
||||
@@ -5637,7 +5637,7 @@ glusterd_op_gsync_set (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
|
||||
GD_MSG_GSYNCD_OP_SET_FAILED, GEOREP" is not "
|
||||
"set up for %s(master) and %s(slave)",
|
||||
volname, slave);
|
||||
- *op_errstr = strdup (GEOREP" is not set up");
|
||||
+ *op_errstr = gf_strdup (GEOREP" is not set up");
|
||||
goto out;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
127
0267-geo-rep-scheduler-Fix-crash.patch
Normal file
127
0267-geo-rep-scheduler-Fix-crash.patch
Normal file
@ -0,0 +1,127 @@
|
||||
From daab3274ba03f4df0160374fa9fb5993847f3153 Mon Sep 17 00:00:00 2001
|
||||
From: Kotresh HR <khiremat@redhat.com>
|
||||
Date: Wed, 9 May 2018 01:10:29 -0400
|
||||
Subject: [PATCH 267/271] geo-rep/scheduler: Fix crash
|
||||
|
||||
Fix crash where session_name is referenced
|
||||
before assignment. Well, this is a corner
|
||||
case where the geo-rep session exists and
|
||||
the status output doesn't show any rows.
|
||||
This might happen when glusterd is down
|
||||
or when the system is in inconsistent state
|
||||
w.r.t glusterd.
|
||||
|
||||
Upstream reference:
|
||||
> fixes: bz#1576179
|
||||
> Change-Id: Iec1557e01b35068041b4b3c1aacee2bfa0e05873
|
||||
> Patch: https://review.gluster.org/19991
|
||||
|
||||
BUG: 1575877
|
||||
Change-Id: Iec1557e01b35068041b4b3c1aacee2bfa0e05873
|
||||
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138668
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
extras/geo-rep/schedule_georep.py.in | 70 ++++++++++++++++++------------------
|
||||
1 file changed, 35 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/extras/geo-rep/schedule_georep.py.in b/extras/geo-rep/schedule_georep.py.in
|
||||
index 1887fe7..4e1a071 100644
|
||||
--- a/extras/geo-rep/schedule_georep.py.in
|
||||
+++ b/extras/geo-rep/schedule_georep.py.in
|
||||
@@ -297,6 +297,7 @@ def get_summary(mastervol, slave_url):
|
||||
status_data = get(mastervol, slave_url)
|
||||
|
||||
for session in status_data:
|
||||
+ session_name = ""
|
||||
summary = {
|
||||
"active": 0,
|
||||
"passive": 0,
|
||||
@@ -339,7 +340,8 @@ def get_summary(mastervol, slave_url):
|
||||
if summary["faulty"] == 0 and summary["offline"] == 0:
|
||||
summary["ok"] = True
|
||||
|
||||
- out.append([session_name, summary, faulty_rows, down_rows])
|
||||
+ if session_name != "":
|
||||
+ out.append([session_name, summary, faulty_rows, down_rows])
|
||||
|
||||
return out
|
||||
|
||||
@@ -397,41 +399,39 @@ def main(args):
|
||||
# or any other error. Gluster cmd still produces XML output
|
||||
# with different message
|
||||
output_warning("Unable to get Geo-replication Status")
|
||||
- time.sleep(1)
|
||||
- continue
|
||||
-
|
||||
- session_name, summary, faulty_rows, down_rows = session_summary[0]
|
||||
- chkpt_status = "COMPLETE" if summary["checkpoints_ok"] else \
|
||||
- "NOT COMPLETE"
|
||||
- ok_status = "OK" if summary["ok"] else "NOT OK"
|
||||
-
|
||||
- if summary["ok"]:
|
||||
- output_ok("All Checkpoints {1}, "
|
||||
- "All status {2} (Turns {0:>3})".format(
|
||||
- turns, chkpt_status, ok_status))
|
||||
else:
|
||||
- output_warning("All Checkpoints {1}, "
|
||||
- "All status {2} (Turns {0:>3})".format(
|
||||
- turns, chkpt_status, ok_status))
|
||||
-
|
||||
- output_warning("Geo-rep workers Faulty/Offline, "
|
||||
- "Faulty: {0} Offline: {1}".format(
|
||||
- repr(faulty_rows),
|
||||
- repr(down_rows)))
|
||||
-
|
||||
- if summary["checkpoints_ok"]:
|
||||
- output_ok("Stopping Geo-replication session now")
|
||||
- cmd = ["@SBIN_DIR@/gluster", "volume", "geo-replication",
|
||||
- args.mastervol,
|
||||
- "%s::%s" % (args.slave, args.slavevol), "stop"]
|
||||
- execute(cmd)
|
||||
- break
|
||||
- else:
|
||||
- # If Checkpoint is not complete after a iteration means brick
|
||||
- # was down and came online now. SETATTR on mount is not
|
||||
- # recorded, So again issue touch on mount root So that
|
||||
- # Stime will increase and Checkpoint will complete.
|
||||
- touch_mount_root(args.mastervol)
|
||||
+ session_name, summary, faulty_rows, down_rows = session_summary[0]
|
||||
+ chkpt_status = "COMPLETE" if summary["checkpoints_ok"] else \
|
||||
+ "NOT COMPLETE"
|
||||
+ ok_status = "OK" if summary["ok"] else "NOT OK"
|
||||
+
|
||||
+ if summary["ok"]:
|
||||
+ output_ok("All Checkpoints {1}, "
|
||||
+ "All status {2} (Turns {0:>3})".format(
|
||||
+ turns, chkpt_status, ok_status))
|
||||
+ else:
|
||||
+ output_warning("All Checkpoints {1}, "
|
||||
+ "All status {2} (Turns {0:>3})".format(
|
||||
+ turns, chkpt_status, ok_status))
|
||||
+
|
||||
+ output_warning("Geo-rep workers Faulty/Offline, "
|
||||
+ "Faulty: {0} Offline: {1}".format(
|
||||
+ repr(faulty_rows),
|
||||
+ repr(down_rows)))
|
||||
+
|
||||
+ if summary["checkpoints_ok"]:
|
||||
+ output_ok("Stopping Geo-replication session now")
|
||||
+ cmd = ["@SBIN_DIR@/gluster", "volume", "geo-replication",
|
||||
+ args.mastervol,
|
||||
+ "%s::%s" % (args.slave, args.slavevol), "stop"]
|
||||
+ execute(cmd)
|
||||
+ break
|
||||
+ else:
|
||||
+ # If Checkpoint is not complete after a iteration means brick
|
||||
+ # was down and came online now. SETATTR on mount is not
|
||||
+ # recorded, So again issue touch on mount root So that
|
||||
+ # Stime will increase and Checkpoint will complete.
|
||||
+ touch_mount_root(args.mastervol)
|
||||
|
||||
# Increment the turns and Sleep for 10 sec
|
||||
turns += 1
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 717fab7db9afb3d2f512fcdb7a952eb57b67e8dd Mon Sep 17 00:00:00 2001
|
||||
From: Mohit Agrawal <moagrawa@redhat.com>
|
||||
Date: Thu, 10 May 2018 16:54:44 +0530
|
||||
Subject: [PATCH 268/271] dht: Excessive 'dict is null' logs in
|
||||
dht_discover_complete
|
||||
|
||||
Problem: In Geo-Rep setup excessive "dict is null" logs in
|
||||
dht_discover_complete while xattr is NULL
|
||||
|
||||
Solution: To avoid the logs update a condition in dht_discover_complete
|
||||
|
||||
> BUG: 1576767
|
||||
> Change-Id: Ic7aad712d9b6d69b85b76e4fdf2881adb0512237
|
||||
> fixes: bz#1576767
|
||||
> (cherry pick from commit 08dcb1c2bf02bba313d3bfc8fbc1c8ea63296321)
|
||||
> (Upstream review link https://review.gluster.org/#/c/20001/)
|
||||
|
||||
BUG: 1565577
|
||||
Change-Id: I1b1327eeef05fa261c814069a3bdd75653b37bd1
|
||||
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138490
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
xlators/cluster/dht/src/dht-common.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
|
||||
index ec1628a..feeaa3f 100644
|
||||
--- a/xlators/cluster/dht/src/dht-common.c
|
||||
+++ b/xlators/cluster/dht/src/dht-common.c
|
||||
@@ -748,7 +748,8 @@ cleanup:
|
||||
done:
|
||||
dht_set_fixed_dir_stat (&local->postparent);
|
||||
/* Delete mds xattr at the time of STACK UNWIND */
|
||||
- GF_REMOVE_INTERNAL_XATTR (conf->mds_xattr_key, local->xattr);
|
||||
+ if (local->xattr)
|
||||
+ GF_REMOVE_INTERNAL_XATTR (conf->mds_xattr_key, local->xattr);
|
||||
|
||||
DHT_STACK_UNWIND (lookup, main_frame, local->op_ret, local->op_errno,
|
||||
local->inode, &local->stbuf, local->xattr,
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 79b42b350da05615422443aa34b5af1909786ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Krutika Dhananjay <kdhananj@redhat.com>
|
||||
Date: Thu, 12 Apr 2018 13:41:29 +0530
|
||||
Subject: [PATCH 269/271] extras: Disable choose-local in groups virt and
|
||||
gluster-block
|
||||
|
||||
> Upstream: https://review.gluster.org/19855
|
||||
> BUG: 1566386
|
||||
> Change-Id: Icba68406d86623195d59d6ee668e0850c037c63a
|
||||
|
||||
Change-Id: If5575abf3c737fbfc7454d008b945530ed9b7bb3
|
||||
BUG: 1568297
|
||||
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/135960
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
extras/group-gluster-block | 1 +
|
||||
extras/group-virt.example | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/extras/group-gluster-block b/extras/group-gluster-block
|
||||
index e94f834..d619255 100644
|
||||
--- a/extras/group-gluster-block
|
||||
+++ b/extras/group-gluster-block
|
||||
@@ -16,3 +16,4 @@ features.shard=on
|
||||
features.shard-block-size=64MB
|
||||
user.cifs=off
|
||||
server.allow-insecure=on
|
||||
+cluster.choose-local=off
|
||||
diff --git a/extras/group-virt.example b/extras/group-virt.example
|
||||
index 403bed6..7e34b72 100644
|
||||
--- a/extras/group-virt.example
|
||||
+++ b/extras/group-virt.example
|
||||
@@ -12,3 +12,4 @@ cluster.shd-max-threads=8
|
||||
cluster.shd-wait-qlength=10000
|
||||
features.shard=on
|
||||
user.cifs=off
|
||||
+cluster.choose-local=off
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,91 @@
|
||||
From aad829320132fb2399e8fd8edfa573561a7c03e1 Mon Sep 17 00:00:00 2001
|
||||
From: Mohit Agrawal <moagrawa@redhat.com>
|
||||
Date: Sun, 13 May 2018 12:01:01 +0530
|
||||
Subject: [PATCH 270/271] glusterfs: Resolve brick crashes at the time of
|
||||
inode_unref
|
||||
|
||||
Problem: Sometimes brick process is getting crash at the time
|
||||
of calling inode_unref in fd_destroy
|
||||
|
||||
Solution: Brick process is getting crash because inode is already
|
||||
free by xlator_mem_cleanup call by server_rpc_notify.To
|
||||
resolve the same move code specific to call transport_unref
|
||||
in last in free_state.
|
||||
|
||||
> BUG: 1577574
|
||||
> Change-Id: Ia517c230d68af4e929b6b753e4c374a26c39dc1a
|
||||
> fixes: bz#1577574
|
||||
> (cherry picked from commit 8e2289b1e76ac777b71897dc709d9651341bd241)
|
||||
> (Upstream link for review https://review.gluster.org/#/c/20014/)
|
||||
|
||||
BUG: 1575840
|
||||
Change-Id: I62df8dd6f4df545250a977897697c960adba1c4c
|
||||
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138797
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
xlators/protocol/server/src/server-helpers.c | 15 +++++++++++----
|
||||
xlators/protocol/server/src/server.c | 6 +++---
|
||||
2 files changed, 14 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
|
||||
index c8f5382..c492ab1 100644
|
||||
--- a/xlators/protocol/server/src/server-helpers.c
|
||||
+++ b/xlators/protocol/server/src/server-helpers.c
|
||||
@@ -177,10 +177,6 @@ server_resolve_wipe (server_resolve_t *resolve)
|
||||
void
|
||||
free_state (server_state_t *state)
|
||||
{
|
||||
- if (state->xprt) {
|
||||
- rpc_transport_unref (state->xprt);
|
||||
- state->xprt = NULL;
|
||||
- }
|
||||
if (state->fd) {
|
||||
fd_unref (state->fd);
|
||||
state->fd = NULL;
|
||||
@@ -223,6 +219,17 @@ free_state (server_state_t *state)
|
||||
|
||||
compound_args_cleanup (state->args);
|
||||
|
||||
+ /* Call rpc_trnasport_unref to avoid crashes at last after free
|
||||
+ all resources because of server_rpc_notify (for transport destroy)
|
||||
+ call's xlator_mem_cleanup if all xprt are destroyed that internally
|
||||
+ call's inode_table_destroy.
|
||||
+ */
|
||||
+ if (state->xprt) {
|
||||
+ rpc_transport_unref (state->xprt);
|
||||
+ state->xprt = NULL;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
GF_FREE (state);
|
||||
}
|
||||
|
||||
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
|
||||
index 2ba5da3..d40457c 100644
|
||||
--- a/xlators/protocol/server/src/server.c
|
||||
+++ b/xlators/protocol/server/src/server.c
|
||||
@@ -208,9 +208,6 @@ server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg,
|
||||
|
||||
ret = 0;
|
||||
ret:
|
||||
- if (state)
|
||||
- free_state (state);
|
||||
-
|
||||
if (client)
|
||||
gf_client_unref (client);
|
||||
|
||||
@@ -220,6 +217,9 @@ ret:
|
||||
if (new_iobref)
|
||||
iobref_unref (iobref);
|
||||
|
||||
+ if (state)
|
||||
+ free_state (state);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
52
0271-cli-Fix-for-gluster-volume-info-xml.patch
Normal file
52
0271-cli-Fix-for-gluster-volume-info-xml.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 261a0b3feb520f7992dc026856b4b200670900ab Mon Sep 17 00:00:00 2001
|
||||
From: Sanju Rakonde <srakonde@redhat.com>
|
||||
Date: Sun, 13 May 2018 21:03:12 +0530
|
||||
Subject: [PATCH 271/271] cli: Fix for gluster volume info --xml
|
||||
|
||||
Problem: gluster volume info --xml is showing same uuid to all
|
||||
the bricks of a tier volume.
|
||||
|
||||
Solution: While iterating over hot/cold bricks of a tier volume, use
|
||||
correct iterator.
|
||||
|
||||
>Fixes: bz#1577627
|
||||
>Change-Id: Icf6a9c2a10b9da453abc262a57b7884d6638e3ed
|
||||
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
||||
|
||||
upstream patch: https://review.gluster.org/#/c/20015/
|
||||
|
||||
BUG: 1572043
|
||||
Change-Id: Icf6a9c2a10b9da453abc262a57b7884d6638e3ed
|
||||
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
||||
Reviewed-on: https://code.engineering.redhat.com/gerrit/138786
|
||||
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||
---
|
||||
cli/src/cli-xml-output.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
|
||||
index 29ee81b..a709ed5 100644
|
||||
--- a/cli/src/cli-xml-output.c
|
||||
+++ b/cli/src/cli-xml-output.c
|
||||
@@ -2942,7 +2942,7 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict)
|
||||
|
||||
memset (key, 0, sizeof (key));
|
||||
snprintf (key, sizeof (key),
|
||||
- "volume%d.brick%d.uuid", i, j);
|
||||
+ "volume%d.brick%d.uuid", i, index);
|
||||
ret = dict_get_str (dict, key, &uuid);
|
||||
if (ret)
|
||||
goto out;
|
||||
@@ -3053,7 +3053,7 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict)
|
||||
|
||||
memset (key, 0, sizeof (key));
|
||||
snprintf (key, sizeof (key),
|
||||
- "volume%d.brick%d.uuid", i, j);
|
||||
+ "volume%d.brick%d.uuid", i, index);
|
||||
ret = dict_get_str (dict, key, &uuid);
|
||||
if (ret)
|
||||
goto out;
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -192,7 +192,7 @@ Release: 0.1%{?prereltag:.%{prereltag}}%{?dist}
|
||||
%else
|
||||
Name: glusterfs
|
||||
Version: 3.12.2
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
%endif
|
||||
License: GPLv2 or LGPLv3+
|
||||
Group: System Environment/Base
|
||||
@ -525,6 +525,17 @@ Patch0257: 0257-rpc-rearm-listener-socket-early.patch
|
||||
Patch0258: 0258-cluster-dht-log-error-only-if-layout-healing-is-requ.patch
|
||||
Patch0259: 0259-Quota-Turn-on-ssl-for-crawler-clients-if-needed.patch
|
||||
Patch0260: 0260-dht-Avoid-dict-log-flooding-for-internal-MDS-xattr.patch
|
||||
Patch0261: 0261-libglusterfs-syncop-Add-syncop_entrylk.patch
|
||||
Patch0262: 0262-cluster-dht-store-the-reaction-on-failures-per-lock.patch
|
||||
Patch0263: 0263-server-resolver-don-t-trust-inode-table-for-RESOLVE_.patch
|
||||
Patch0264: 0264-cluster-dht-fixes-to-parallel-renames-to-same-destin.patch
|
||||
Patch0265: 0265-Glusterfsd-brick-crash-during-get-state.patch
|
||||
Patch0266: 0266-glusterd-geo-rep-Fix-glusterd-crash.patch
|
||||
Patch0267: 0267-geo-rep-scheduler-Fix-crash.patch
|
||||
Patch0268: 0268-dht-Excessive-dict-is-null-logs-in-dht_discover_comp.patch
|
||||
Patch0269: 0269-extras-Disable-choose-local-in-groups-virt-and-glust.patch
|
||||
Patch0270: 0270-glusterfs-Resolve-brick-crashes-at-the-time-of-inode.patch
|
||||
Patch0271: 0271-cli-Fix-for-gluster-volume-info-xml.patch
|
||||
|
||||
%description
|
||||
GlusterFS is a distributed file-system capable of scaling to several
|
||||
@ -2471,6 +2482,10 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue May 15 2018 Milind Changire <mchangir@redhat.com> - 3.12.2-10
|
||||
- fixes bugs bz#1488120 bz#1565577 bz#1568297 bz#1570586 bz#1572043
|
||||
bz#1572075 bz#1575840 bz#1575877
|
||||
|
||||
* Wed May 09 2018 Milind Changire <mchangir@redhat.com> - 3.12.2-9
|
||||
- fixes bugs bz#1546717 bz#1557551 bz#1558948 bz#1561999 bz#1563804
|
||||
bz#1565015 bz#1565119 bz#1565399 bz#1565577 bz#1567100 bz#1567899 bz#1568374
|
||||
|
Loading…
Reference in New Issue
Block a user