diff --git a/0129-posix-delete-stale-gfid-handles-in-nameless-lookup.patch b/0129-posix-delete-stale-gfid-handles-in-nameless-lookup.patch new file mode 100644 index 0000000..1e75221 --- /dev/null +++ b/0129-posix-delete-stale-gfid-handles-in-nameless-lookup.patch @@ -0,0 +1,134 @@ +From 960ecba01a057ff8a2fc356624720904419e7f49 Mon Sep 17 00:00:00 2001 +From: Ravishankar N +Date: Tue, 16 Jan 2018 10:16:41 +0530 +Subject: [PATCH 129/139] posix: delete stale gfid handles in nameless lookup + +..in order for self-heal of symlinks to work properly (see BZ for +details). + +Backport of https://review.gluster.org/#/c/19070/ +Signed-off-by: Ravishankar N + +Change-Id: I9a011d00b07a690446f7fd3589e96f840e8b7501 +BUG: 1527309 +Reviewed-on: https://code.engineering.redhat.com/gerrit/127739 +Tested-by: Ravishankar Narayanankutty +Tested-by: RHGS Build Bot +Reviewed-by: Ashish Pandey +Reviewed-by: Ravishankar Narayanankutty +--- + tests/bugs/heal-symlinks.t | 65 +++++++++++++++++++++++++++++++++++++++ + xlators/storage/posix/src/posix.c | 17 +++++++++- + 2 files changed, 81 insertions(+), 1 deletion(-) + create mode 100644 tests/bugs/heal-symlinks.t + +diff --git a/tests/bugs/heal-symlinks.t b/tests/bugs/heal-symlinks.t +new file mode 100644 +index 0000000..ecd2b52 +--- /dev/null ++++ b/tests/bugs/heal-symlinks.t +@@ -0,0 +1,65 @@ ++#!/bin/bash ++. $(dirname $0)/../include.rc ++. $(dirname $0)/../volume.rc ++. $(dirname $0)/../afr.rc ++cleanup; ++ ++############################################################################### ++TEST glusterd ++TEST pidof glusterd ++TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2} ++TEST $CLI volume set $V0 performance.stat-prefetch off ++TEST $CLI volume start $V0 ++ ++TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 --entry-timeout=0 $M0; ++ ++cd $M0 ++TEST "echo hello_world > FILE" ++TEST ln -s FILE SOFTLINK ++ ++# Remove symlink only (not the .glusterfs entry) and trigger named heal. ++TEST rm -f $B0/${V0}2/SOFTLINK ++TEST stat SOFTLINK ++ ++# To heal and clear new-entry mark on source bricks. ++TEST $CLI volume heal $V0 ++EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0 ++ ++EXPECT 2 stat -c %h $B0/${V0}2/SOFTLINK ++EXPECT "hello_world" cat $B0/${V0}2/SOFTLINK ++ ++cd - ++cleanup ++############################################################################### ++ ++TEST glusterd ++TEST pidof glusterd ++TEST $CLI volume create $V0 disperse 3 redundancy 1 $H0:$B0/${V0}{0,1,2} ++TEST $CLI volume set $V0 performance.stat-prefetch off ++TEST $CLI volume start $V0 ++ ++TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 --entry-timeout=0 $M0; ++ ++cd $M0 ++TEST "echo hello_world > FILE" ++TEST ln -s FILE SOFTLINK ++ ++# Remove symlink only (not the .glusterfs entry) and trigger named heal. ++TEST rm -f $B0/${V0}2/SOFTLINK ++TEST stat SOFTLINK ++ ++# To heal and clear new-entry mark on source bricks. ++TEST $CLI volume heal $V0 ++EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0 ++ ++EXPECT 2 stat -c %h $B0/${V0}2/SOFTLINK ++TEST kill_brick $V0 $H0 $B0/${V0}0 ++cd - ++EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 ++TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 --entry-timeout=0 $M0; ++cd $M0 ++EXPECT "hello_world" cat SOFTLINK ++ ++cd - ++cleanup ++############################################################################### +diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c +index d0433ec..8aeca3b 100644 +--- a/xlators/storage/posix/src/posix.c ++++ b/xlators/storage/posix/src/posix.c +@@ -213,7 +213,10 @@ posix_lookup (call_frame_t *frame, xlator_t *this, + dict_t * xattr = NULL; + char * real_path = NULL; + char * par_path = NULL; ++ char *gfid_path = NULL; ++ uuid_t gfid = {0}; + struct iatt postparent = {0,}; ++ struct stat statbuf = {0}; + int32_t gfidless = 0; + char *pgfid_xattr_key = NULL; + int32_t nlink_samepgfid = 0; +@@ -267,7 +270,19 @@ posix_lookup (call_frame_t *frame, xlator_t *this, + "lstat on %s failed", + real_path ? real_path : "null"); + } +- ++ if (loc_is_nameless(loc)) { ++ if (!op_errno) ++ op_errno = ESTALE; ++ loc_gfid (loc, gfid); ++ MAKE_HANDLE_ABSPATH (gfid_path, this, gfid); ++ op_ret = sys_lstat(gfid_path, &statbuf); ++ if (op_ret == 0 && statbuf.st_nlink == 1) { ++ gf_msg (this->name, GF_LOG_WARNING, ESTALE, ++ P_MSG_HANDLE_DELETE, "Found stale gfid " ++ "handle %s, removing it.", gfid_path); ++ posix_handle_unset (this, gfid, NULL); ++ } ++ } + entry_ret = -1; + goto parent; + } +-- +1.8.3.1 + diff --git a/0130-md-cache-avoid-checking-the-xattr-value-buffer-with-.patch b/0130-md-cache-avoid-checking-the-xattr-value-buffer-with-.patch new file mode 100644 index 0000000..0347d46 --- /dev/null +++ b/0130-md-cache-avoid-checking-the-xattr-value-buffer-with-.patch @@ -0,0 +1,93 @@ +From cb681aeb67fbca52e8e0aab04a909e4bf8a62174 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=BCnther=20Deschner?= +Date: Mon, 9 Oct 2017 18:02:25 +0200 +Subject: [PATCH 130/139] md-cache: avoid checking the xattr value buffer with + string functions. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +xattrs may very well contain binary, non-text data with leading 0 +values. Using strcmp for checking empty values is not the appropriate +thing to do: In the best case, it might treat a binary xattr value +starting with 0 from being cached (and hence also from being reported +back with xattr). In the worst case, we might read beyond the end +of a data blob that does contain any zero byte. + +We fix this by checking the length of the data blob and checking +the first byte against 0 if the length is one. + +> Signed-off-by: Guenther Deschner +> Pair-Programmed-With: Michael Adam +> Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11 +> BUG: 1476324 +> Reviewed-on: https://review.gluster.org/17910 +> Reviewed-by: Michael Adam +> Smoke: Gluster Build System +> Reviewed-by: Poornima G +> Tested-by: Poornima G +> CentOS-regression: Gluster Build System +> (cherry picked from commit ab4ffdac9dec1867f2d9b33242179cf2b347319d) + +Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11 +BUG: 1446125 +Signed-off-by: Günther Deschner +Reviewed-on: https://code.engineering.redhat.com/gerrit/128478 +Tested-by: Poornima Gurusiddaiah +Tested-by: RHGS Build Bot +Reviewed-by: Sunil Kumar Heggodu Gopala Acharya +--- + tests/bugs/md-cache/bug-1476324.t | 27 +++++++++++++++++++++++++++ + xlators/performance/md-cache/src/md-cache.c | 2 +- + 2 files changed, 28 insertions(+), 1 deletion(-) + create mode 100644 tests/bugs/md-cache/bug-1476324.t + +diff --git a/tests/bugs/md-cache/bug-1476324.t b/tests/bugs/md-cache/bug-1476324.t +new file mode 100644 +index 0000000..c34f412 +--- /dev/null ++++ b/tests/bugs/md-cache/bug-1476324.t +@@ -0,0 +1,27 @@ ++#!/bin/bash ++ ++. $(dirname $0)/../../include.rc ++. $(dirname $0)/../../volume.rc ++ ++cleanup; ++ ++TEST glusterd; ++ ++TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2,3}; ++ ++TEST $CLI volume start $V0 ++ ++TEST $CLI volume set $V0 performance.md-cache-timeout 600 ++TEST $CLI volume set $V0 performance.cache-samba-metadata on ++ ++TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 ++ ++TEST touch $M0/file1 ++ ++TEST "setfattr -n user.DOSATTRIB -v 0sAAOW $M0/file1" ++TEST "getfattr -n user.DOSATTRIB $M0/file1 -e base64 | grep -q 0sAAOW" ++ ++TEST "setfattr -n user.DOSATTRIB -v 0x00ff $M0/file1" ++TEST "getfattr -n user.DOSATTRIB $M0/file1 -e hex | grep -q 0x00ff" ++ ++cleanup; +diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c +index d21a6a7..1ca7727 100644 +--- a/xlators/performance/md-cache/src/md-cache.c ++++ b/xlators/performance/md-cache/src/md-cache.c +@@ -633,7 +633,7 @@ updatefn(dict_t *dict, char *key, data_t *value, void *data) + * not update their cache if the value of a xattr is a 0 byte + * data (i.e. ""). + */ +- if (!strcmp (value->data, "")) ++ if (value->len == 1 && value->data[0] == '\0') + continue; + + if (dict_set(u->dict, key, value) < 0) { +-- +1.8.3.1 + diff --git a/0131-readdir-ahead-Add-parallel-readdir-option-in-readdir.patch b/0131-readdir-ahead-Add-parallel-readdir-option-in-readdir.patch new file mode 100644 index 0000000..0c9e61d --- /dev/null +++ b/0131-readdir-ahead-Add-parallel-readdir-option-in-readdir.patch @@ -0,0 +1,81 @@ +From 20a92ebcfcf534390468fadca97e7fdc0207967c Mon Sep 17 00:00:00 2001 +From: Poornima G +Date: Wed, 25 Oct 2017 17:00:36 +0530 +Subject: [PATCH 131/139] readdir-ahead: Add parallel-readdir option in + readdir-ahead + +parallel-readdir option is defined as belonging to readdir-ahead +in glusterd-volume-set.c, but was not defined in options of +readdir-ahead, fixing the same. + +> Reviewed on: https://review.gluster.org/#/c/18572/ +> Change-Id: I97cc88b38ab99ade5f066519ca1cb9bfed03a7da +> BUG: 1506197 +> Signed-off-by: Poornima G +> (cherry picked from commit 80a6a2357c0c0351691c450c40de820efce7ff6f) + +Change-Id: I97cc88b38ab99ade5f066519ca1cb9bfed03a7da +BUG: 1463592 +Signed-off-by: Poornima G +Reviewed-on: https://code.engineering.redhat.com/gerrit/128484 +Tested-by: RHGS Build Bot +Reviewed-by: Sunil Kumar Heggodu Gopala Acharya +Reviewed-by: Atin Mukherjee +--- + xlators/performance/readdir-ahead/src/readdir-ahead.c | 13 +++++++++++++ + xlators/performance/readdir-ahead/src/readdir-ahead.h | 1 + + 2 files changed, 14 insertions(+) + +diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c +index 8827b8b..c2ceda4 100644 +--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c ++++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c +@@ -635,6 +635,8 @@ reconfigure(xlator_t *this, dict_t *options) + size_uint64, err); + GF_OPTION_RECONF("rda-cache-limit", priv->rda_cache_limit, options, + size_uint64, err); ++ GF_OPTION_RECONF("parallel-readdir", priv->parallel_readdir, options, ++ bool, err); + + return 0; + err: +@@ -678,6 +680,8 @@ init(xlator_t *this) + err); + GF_OPTION_INIT("rda-cache-limit", priv->rda_cache_limit, size_uint64, + err); ++ GF_OPTION_INIT("parallel-readdir", priv->parallel_readdir, bool, ++ err); + + return 0; + +@@ -745,6 +749,15 @@ struct volume_options options[] = { + "value, irrespective of the number/size of " + "directories cached", + }, ++ { .key = {"parallel-readdir"}, ++ .type = GF_OPTION_TYPE_BOOL, ++ .default_value = "off", ++ .description = "If this option is enabled, the readdir operation " ++ "is performed in parallel on all the bricks, thus " ++ "improving the performance of readdir. Note that " ++ "the performance improvement is higher in large " ++ "clusters" ++ }, + { .key = {NULL} }, + }; + +diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.h b/xlators/performance/readdir-ahead/src/readdir-ahead.h +index 8c663e0..36d4df8 100644 +--- a/xlators/performance/readdir-ahead/src/readdir-ahead.h ++++ b/xlators/performance/readdir-ahead/src/readdir-ahead.h +@@ -45,6 +45,7 @@ struct rda_priv { + uint64_t rda_high_wmark; + uint64_t rda_cache_limit; + uint64_t rda_cache_size; ++ gf_boolean_t parallel_readdir; + }; + + #endif /* __READDIR_AHEAD_H */ +-- +1.8.3.1 + diff --git a/0132-posix-In-getxattr-honor-the-wildcard.patch b/0132-posix-In-getxattr-honor-the-wildcard.patch new file mode 100644 index 0000000..a4814c3 --- /dev/null +++ b/0132-posix-In-getxattr-honor-the-wildcard.patch @@ -0,0 +1,184 @@ +From 0499970747a7897bd9190484b5ab6868b19f393f Mon Sep 17 00:00:00 2001 +From: Poornima G +Date: Thu, 4 Jan 2018 19:38:05 +0530 +Subject: [PATCH 132/139] posix: In getxattr, honor the wildcard '*' + +Currently, the posix_xattr_fill performas a sys_getxattr +on all the keys requested, there are requirements where +the keys could contain a wildcard, in which case sys_getxattr +would return ENODATA, eg: if the xattr requested is user.* +all the xattrs with prefix user. should be returned, with their +values. + +This patch, changes posix_xattr_fill, to honor wildcard in the keys +requested. + +Updates #297 + +> Signed-off-by: Poornima G +> Change-Id: I3d52da2957ac386fca3c156e26ff4cdf0b2c79a9 +> Reviewed-on: https://review.gluster.org/19170 +> Smoke: Gluster Build System +> Reviewed-by: Amar Tumballi +> Tested-by: Poornima G +> CentOS-regression: Gluster Build System +> (cherry picked from commit 8fc9c6a8fc7c73b2b4c65a8ddbe988bca10e89b6) + +BUG: 1446125 +Change-Id: I3d52da2957ac386fca3c156e26ff4cdf0b2c79a9 +Signed-off-by: Poornima G +Reviewed-on: https://code.engineering.redhat.com/gerrit/128480 +Tested-by: RHGS Build Bot +Reviewed-by: Sunil Kumar Heggodu Gopala Acharya +--- + xlators/storage/posix/src/posix-helpers.c | 64 ++++++++++++++++++++----------- + xlators/storage/posix/src/posix.h | 2 + + 2 files changed, 43 insertions(+), 23 deletions(-) + +diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c +index 77affc4..f8d8fed 100644 +--- a/xlators/storage/posix/src/posix-helpers.c ++++ b/xlators/storage/posix/src/posix-helpers.c +@@ -387,7 +387,9 @@ _posix_xattr_get_set (dict_t *xattr_req, char *key, data_t *data, + int _fd = -1; + loc_t *loc = NULL; + ssize_t req_size = 0; +- ++ int32_t list_offset = 0; ++ ssize_t remaining_size = 0; ++ char *xattr = NULL; + + if (posix_xattr_ignorable (key)) + goto out; +@@ -507,13 +509,20 @@ _posix_xattr_get_set (dict_t *xattr_req, char *key, data_t *data, + filler->stbuf->ia_size); + } + } else { +- ret = _posix_xattr_get_set_from_backend (filler, key); ++ remaining_size = filler->list_size; ++ while (remaining_size > 0) { ++ xattr = filler->list + list_offset; ++ if (fnmatch (key, xattr, 0) == 0) ++ ret = _posix_xattr_get_set_from_backend (filler, ++ xattr); ++ remaining_size -= strlen (xattr) + 1; ++ list_offset += strlen (xattr) + 1; ++ } + } + out: + return 0; + } + +- + int + posix_fill_gfid_path (xlator_t *this, const char *path, struct iatt *iatt) + { +@@ -712,42 +721,50 @@ out: + return ret; + } + ++ + static void +-_handle_list_xattr (dict_t *xattr_req, const char *real_path, int fdnum, +- posix_xattr_filler_t *filler) ++_get_list_xattr (posix_xattr_filler_t *filler) + { + ssize_t size = 0; +- char *list = NULL; +- int32_t list_offset = 0; +- ssize_t remaining_size = 0; +- char *key = NULL; + +- if ((!real_path) && (fdnum < 0)) ++ if ((!filler) && (!filler->real_path) && (filler->fdnum < 0)) + goto out; + +- if (real_path) +- size = sys_llistxattr (real_path, NULL, 0); ++ if (filler->real_path) ++ size = sys_llistxattr (filler->real_path, NULL, 0); + else +- size = sys_flistxattr (fdnum, NULL, 0); ++ size = sys_flistxattr (filler->fdnum, NULL, 0); + + if (size <= 0) + goto out; + +- list = alloca (size); +- if (!list) ++ filler->list = GF_CALLOC (1, size, gf_posix_mt_char); ++ if (!filler->list) + goto out; + +- if (real_path) +- remaining_size = sys_llistxattr (real_path, list, size); ++ if (filler->real_path) ++ size = sys_llistxattr (filler->real_path, filler->list, size); + else +- remaining_size = sys_flistxattr (fdnum, list, size); ++ size = sys_flistxattr (filler->fdnum, filler->list, size); + +- if (remaining_size <= 0) +- goto out; ++ filler->list_size = size; ++out: ++ return; ++} ++ ++ ++static void ++_handle_list_xattr (dict_t *xattr_req, const char *real_path, int fdnum, ++ posix_xattr_filler_t *filler) ++{ ++ int32_t list_offset = 0; ++ ssize_t remaining_size = 0; ++ char *key = NULL; + + list_offset = 0; ++ remaining_size = filler->list_size; + while (remaining_size > 0) { +- key = list + list_offset; ++ key = filler->list + list_offset; + + if (gf_get_index_by_elem (list_xattr_ignore_xattrs, key) >= 0) + goto next; +@@ -770,7 +787,6 @@ next: + list_offset += strlen (key) + 1; + + } /* while (remaining_size > 0) */ +-out: + return; + } + +@@ -798,12 +814,14 @@ posix_xattr_fill (xlator_t *this, const char *real_path, loc_t *loc, fd_t *fd, + filler.stbuf = buf; + filler.loc = loc; + filler.fd = fd; +- filler.fdnum = fdnum; ++ filler.fdnum = fdnum; + ++ _get_list_xattr (&filler); + dict_foreach (xattr_req, _posix_xattr_get_set, &filler); + if (list) + _handle_list_xattr (xattr_req, real_path, fdnum, &filler); + ++ GF_FREE (filler.list); + out: + return xattr; + } +diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h +index 777adac..ae9fb08 100644 +--- a/xlators/storage/posix/src/posix.h ++++ b/xlators/storage/posix/src/posix.h +@@ -240,6 +240,8 @@ typedef struct { + int fdnum; + int flags; + int32_t op_errno; ++ char *list; ++ size_t list_size; + } posix_xattr_filler_t; + + typedef struct { +-- +1.8.3.1 + diff --git a/0133-upcall-Allow-md-cache-to-specify-invalidations-on-xa.patch b/0133-upcall-Allow-md-cache-to-specify-invalidations-on-xa.patch new file mode 100644 index 0000000..268aa32 --- /dev/null +++ b/0133-upcall-Allow-md-cache-to-specify-invalidations-on-xa.patch @@ -0,0 +1,88 @@ +From 897f0604f34760afe585a28d9787c6ff39d3addc Mon Sep 17 00:00:00 2001 +From: Poornima G +Date: Tue, 9 Jan 2018 10:32:16 +0530 +Subject: [PATCH 133/139] upcall: Allow md-cache to specify invalidations on + xattr with wildcard + +Currently, md-cache sends a list of xattrs, it is inttrested in recieving +invalidations for. But, it cannot specify any wildcard in the xattr names +Eg: user.* - invalidate on updating any xattr with user. prefix. + +This patch, enable upcall to honor wildcard in the xattr key names + +Updates: #297 + +> Signed-off-by: Poornima G +> Change-Id: I98caf0ed72f11ef10770bf2067d4428880e0a03a +> Reviewed-on: https://review.gluster.org/19171 +> Smoke: Gluster Build System +> Reviewed-by: Amar Tumballi +> Tested-by: Poornima G +> CentOS-regression: Gluster Build System +> (cherry picked from commit efc30e60e233164bd4fe7fc903a7c5f718b0448b) + +Change-Id: I98caf0ed72f11ef10770bf2067d4428880e0a03a +BUG: 1446125 +Signed-off-by: Poornima G +Reviewed-on: https://code.engineering.redhat.com/gerrit/128481 +Tested-by: RHGS Build Bot +Reviewed-by: Sunil Kumar Heggodu Gopala Acharya +--- + tests/bugs/md-cache/bug-1211863.t | 0 + xlators/features/upcall/src/upcall-internal.c | 25 +++++++++++++++++++++---- + 2 files changed, 21 insertions(+), 4 deletions(-) + mode change 100644 => 100755 tests/bugs/md-cache/bug-1211863.t + +diff --git a/tests/bugs/md-cache/bug-1211863.t b/tests/bugs/md-cache/bug-1211863.t +old mode 100644 +new mode 100755 +diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c +index 8b15dfc..7813940 100644 +--- a/xlators/features/upcall/src/upcall-internal.c ++++ b/xlators/features/upcall/src/upcall-internal.c +@@ -466,11 +466,29 @@ up_filter_afr_xattr (dict_t *xattrs, char *xattr, data_t *v) + } + + +-static int ++static gf_boolean_t ++up_key_is_regd_xattr (dict_t *regd_xattrs, char *regd_xattr, data_t *v, ++ void *xattr) ++{ ++ int ret = _gf_false; ++ char *key = xattr; ++ ++ if (fnmatch (regd_xattr, key, 0) == 0) ++ ret = _gf_true; ++ ++ return ret; ++} ++ ++ ++int + up_filter_unregd_xattr (dict_t *xattrs, char *xattr, data_t *v, + void *regd_xattrs) + { +- if (dict_get ((dict_t *)regd_xattrs, xattr) == NULL) { ++ int ret = 0; ++ ++ ret = dict_foreach_match (regd_xattrs, up_key_is_regd_xattr, xattr, ++ dict_null_foreach_fn, NULL); ++ if (ret == 0) { + /* xattr was not found in the registered xattr, hence do not + * send notification for its change + */ +@@ -488,9 +506,8 @@ up_filter_xattr (dict_t *xattr, dict_t *regd_xattrs) + { + int ret = 0; + +- /* Remove the xattrs from the dict, if they are not registered for +- * cache invalidation */ + ret = dict_foreach (xattr, up_filter_unregd_xattr, regd_xattrs); ++ + return ret; + } + +-- +1.8.3.1 + diff --git a/0134-cli-Fixed-a-use_after_free.patch b/0134-cli-Fixed-a-use_after_free.patch new file mode 100644 index 0000000..7080503 --- /dev/null +++ b/0134-cli-Fixed-a-use_after_free.patch @@ -0,0 +1,46 @@ +From 8e353f6f4e919541f8830de835da13c805db66a0 Mon Sep 17 00:00:00 2001 +From: N Balachandran +Date: Fri, 5 Jan 2018 08:55:09 +0530 +Subject: [PATCH 134/139] cli: Fixed a use_after_free + +gf_event in cli_cmd_volume_create_cbk was accessing +memory that had already been freed. + +>upstream mainline patch : https://review.gluster.org/#/c/19136/ + +> Change-Id: I447c939fa9b31e18819a62c3b356c14cca390787 +> BUG: 1530910 +> Signed-off-by: N Balachandran +(cherry picked from commit fa903173540df5b82c295a8f7b24848098e49a41) + +Change-Id: I1361b3bfecbd5771f5710b08466b913d807cb60c +BUG: 1531041 +Signed-off-by: N Balachandran +Reviewed-on: https://code.engineering.redhat.com/gerrit/126957 +Reviewed-by: Atin Mukherjee +Tested-by: RHGS Build Bot +--- + cli/src/cli-cmd-volume.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c +index 7110145..2639afa 100644 +--- a/cli/src/cli-cmd-volume.c ++++ b/cli/src/cli-cmd-volume.c +@@ -253,11 +253,12 @@ out: + cli_out ("Volume create failed"); + } + +- CLI_STACK_DESTROY (frame); + if (ret == 0) { + gf_event (EVENT_VOLUME_CREATE, "name=%s;bricks=%s", + (char *)words[2], bricks); + } ++ ++ CLI_STACK_DESTROY (frame); + return ret; + } + +-- +1.8.3.1 + diff --git a/0135-cli-commands-are-missing-in-man-page.patch b/0135-cli-commands-are-missing-in-man-page.patch new file mode 100644 index 0000000..4defda9 --- /dev/null +++ b/0135-cli-commands-are-missing-in-man-page.patch @@ -0,0 +1,134 @@ +From 793830be96b95daaa842ab63da66be8840e04315 Mon Sep 17 00:00:00 2001 +From: Sanju Rakonde +Date: Mon, 27 Nov 2017 00:18:03 +0530 +Subject: [PATCH 135/139] cli: commands are missing in man page + +adding missed commands to gluster manual page. + +>upstream mainline patch : https://review.gluster.org/#/c/18855 + +Change-Id: I2e5eb1b3929241275ee7a046c5e3d45a5aa5c4a2 +BUG: 1516249 +Signed-off-by: Sanju Rakonde +Reviewed-on: https://code.engineering.redhat.com/gerrit/128885 +Reviewed-by: Atin Mukherjee +Tested-by: RHGS Build Bot +--- + doc/gluster.8 | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 47 insertions(+), 2 deletions(-) + +diff --git a/doc/gluster.8 b/doc/gluster.8 +index 4c20307..c13a1c2 100644 +--- a/doc/gluster.8 ++++ b/doc/gluster.8 +@@ -35,6 +35,12 @@ The Gluster Console Manager is a command line utility for elastic volume managem + \fB\ volume info [all|] \fR + Display information about all volumes, or the specified volume. + .TP ++\fB\ volume list \fR ++List all volumes in cluster ++.TP ++\fB\ volume status [all | [nfs|shd||quotad|tierd]] [detail|clients|mem|inode|fd|callpool|tasks|client-list] \fR ++Display status of all or specified volume(s)/brick ++.TP + \fB\ volume create [stripe ] [replica ] [disperse []] [redundancy ] [transport ] ... \fR + Create a new volume of the specified type using the specified bricks and transport type (the default transport type is tcp). + To create a volume with both transports (tcp and rdma), give 'transport tcp,rdma' as an option. +@@ -51,8 +57,17 @@ Stop the specified volume. + \fB\ volume set