From 58d7ef2f7628744db4c7bf8bf5735671e023f1d7 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 9 Feb 2014 21:57:45 -0500 Subject: build: CFLAGS was being polluted by python flags The CFLAGS were being polluted by the python test for glupy. The test also sets CFLAGS -NDEBUG even when passing --enable-debug to configure. To fix it, the patch now saves the necessary python flags into new makefile flags which can now be used by the glupy Makefile.am. BUG: 1063541 Change-Id: I8546a64b8ad4fe9318a97fb6a2f0c36087be1b29 Signed-off-by: Luis Pabon Reviewed-on: http://review.gluster.org/6957 Tested-by: Gluster Build System Reviewed-by: Harshavardhana Tested-by: Harshavardhana --- xlators/features/glupy/src/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/glupy/src/Makefile.am b/xlators/features/glupy/src/Makefile.am index 960862839..21b91a164 100644 --- a/xlators/features/glupy/src/Makefile.am +++ b/xlators/features/glupy/src/Makefile.am @@ -6,15 +6,15 @@ glupydir = $(xlatordir)/glupy glupy_PYTHON = gluster.py negative.py helloworld.py debug-trace.py -glupy_la_LDFLAGS = -module -avoid-version -shared -nostartfiles +glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version -shared -nostartfiles glupy_la_SOURCES = glupy.c glupy_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ -lpthread -l$(BUILD_PYTHON_LIB) noinst_HEADERS = glupy.h -AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -isystem $(BUILD_PYTHON_INC) +AM_CPPFLAGS = $(PYTHONDEV_CPPFLAGS) $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -isystem $(BUILD_PYTHON_INC) -AM_CFLAGS = -Wall -fno-strict-aliasing -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" $(GF_CFLAGS) +AM_CFLAGS = $(PYTHONDEV_CFLAGS) -Wall -fno-strict-aliasing -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" $(GF_CFLAGS) CLEANFILES = -- cgit From 0cab34b3a5e94267bf6b39669b6e85af1fab8f3d Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Fri, 7 Feb 2014 14:29:34 -0800 Subject: core: add @xdata parameter to syncop_[f]removexattr() To be used in afr metadata self-heal Change-Id: I8dac4b19d61e331702427eeb5b606aab3d20b328 BUG: 1021686 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/6941 Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat --- xlators/features/marker/src/marker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features') diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 45058652b..a27a266f0 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -2167,7 +2167,7 @@ remove_quota_keys (dict_t *dict, char *k, data_t *v, void *data) xlator_t *this = frame->this; int ret = -1; - ret = syncop_removexattr (FIRST_CHILD (this), &local->loc, k); + ret = syncop_removexattr (FIRST_CHILD (this), &local->loc, k, 0); if (ret) { gf_log (this->name, GF_LOG_ERROR, "%s: Failed to remove " "extended attribute: %s", local->loc.path, k); -- cgit From f69e85511645fcbd0526e38ca88dd3e5bf0ed917 Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Mon, 17 Feb 2014 20:42:42 +0530 Subject: feature/compress: Validate option and enable doc * Validate network.compression option * Enable descriptions of xlator configurable options * Improve indentation in code * Make network.compression.mode not configurable by user. This is similar to "iam-self-heal-daemon" option in AFR xlator. Fixes BUGs: 1065658, 1065640, 1065655 Change-Id: I99d82b574ee0e5c8c2baf5f5d52dbf8d015d330a BUG: 1065640 Signed-off-by: Prashanth Pai Reviewed-on: http://review.gluster.org/7024 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/compress/src/cdc.c | 78 ++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/compress/src/cdc.c b/xlators/features/compress/src/cdc.c index eb7d87c56..a334c7e06 100644 --- a/xlators/features/compress/src/cdc.c +++ b/xlators/features/compress/src/cdc.c @@ -115,8 +115,8 @@ cdc_writev_cbk (call_frame_t *frame, struct iatt *postbuf, dict_t *xdata) { - STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, prebuf, postbuf, xdata); - return 0; + STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, prebuf, postbuf, xdata); + return 0; } int32_t @@ -129,24 +129,23 @@ cdc_writev (call_frame_t *frame, uint32_t flags, struct iobref *iobref, dict_t *xdata) { - int ret = -1; - cdc_priv_t *priv = NULL; - cdc_info_t ci = {0,}; - size_t isize = 0; + int ret = -1; + cdc_priv_t *priv = NULL; + cdc_info_t ci = {0,}; + size_t isize = 0; - GF_VALIDATE_OR_GOTO ("cdc", this, default_out); - GF_VALIDATE_OR_GOTO (this->name, frame, default_out); + GF_VALIDATE_OR_GOTO ("cdc", this, default_out); + GF_VALIDATE_OR_GOTO (this->name, frame, default_out); - priv = this->private; + priv = this->private; - isize = iov_length(vector, count); + isize = iov_length(vector, count); - if (isize <= 0) - goto default_out; + if (isize <= 0) + goto default_out; - if ( (priv->min_file_size != 0) - && (isize < priv->min_file_size) ) - goto default_out; + if ( (priv->min_file_size != 0) && (isize < priv->min_file_size) ) + goto default_out; ci.count = count; ci.ibytes = isize; @@ -159,18 +158,18 @@ cdc_writev (call_frame_t *frame, /* A writev compresses on the client side and decompresses on the server side */ - if (priv->op_mode == GF_CDC_MODE_CLIENT) { - ret = cdc_compress (this, priv, &ci, &xdata); - } else if (priv->op_mode == GF_CDC_MODE_SERVER) { - ret = cdc_decompress (this, priv, &ci, xdata); - } else { - gf_log (this->name, GF_LOG_ERROR, "Invalid operation mode (%d) ", priv->op_mode); - } - - if (ret) - goto default_out; - - STACK_WIND (frame, + if (priv->op_mode == GF_CDC_MODE_CLIENT) { + ret = cdc_compress (this, priv, &ci, &xdata); + } else if (priv->op_mode == GF_CDC_MODE_SERVER) { + ret = cdc_decompress (this, priv, &ci, xdata); + } else { + gf_log (this->name, GF_LOG_ERROR, "Invalid operation mode (%d) ", priv->op_mode); + } + + if (ret) + goto default_out; + + STACK_WIND (frame, cdc_writev_cbk, FIRST_CHILD (this), FIRST_CHILD (this)->fops->writev, @@ -181,13 +180,13 @@ cdc_writev (call_frame_t *frame, return 0; default_out: - STACK_WIND (frame, + STACK_WIND (frame, cdc_writev_cbk, FIRST_CHILD (this), FIRST_CHILD (this)->fops->writev, fd, vector, count, offset, flags, iobref, xdata); - return 0; + return 0; } int32_t @@ -309,17 +308,17 @@ struct volume_options options[] = { { .key = {"mem-level"}, .default_value = "8", .type = GF_OPTION_TYPE_INT, - .description = "Memory allocated for internal compression state.\ - 1 uses minimum memory but is slow and reduces \ - compression ratio; memLevel=9 uses maximum memory \ - for optimal speed. The default value is 8." + .description = "Memory allocated for internal compression state. " + "1 uses minimum memory but is slow and reduces " + "compression ratio; memLevel=9 uses maximum memory " + "for optimal speed. The default value is 8." }, { .key = {"compression-level"}, .default_value = "-1", .type = GF_OPTION_TYPE_INT, - .description = "Compression levels \ - 0 : no compression, 1 : best speed, \ - 9 : best compression, -1 : default compression " + .description = "Compression levels \n" + "0 : no compression, 1 : best speed, \n" + "9 : best compression, -1 : default compression " }, { .key = {"min-size"}, .default_value = "0", @@ -329,13 +328,14 @@ struct volume_options options[] = { { .key = {"mode"}, .value = {"server", "client"}, .type = GF_OPTION_TYPE_STR, - .description = "Set on the basis of where the xlator is loaded." + .description = "Set on the basis of where the xlator is loaded. " + "This option should NOT be configured by user." }, { .key = {"debug"}, .default_value = "false", .type = GF_OPTION_TYPE_BOOL, - .description = "This is used in testing. Will dump compressed data \ - to disk as a gzip file." + .description = "This is used in testing. Will dump compressed data " + "to disk as a gzip file." }, { .key = {NULL} }, -- cgit From 6535bafe588ea901ac15d31ddb6550a2ba9cd915 Mon Sep 17 00:00:00 2001 From: Kotresh H R Date: Tue, 25 Feb 2014 16:20:46 +0530 Subject: geo-rep/gfid-access: Fix errno for non-existent GFID. Because of http://review.gluster.org/#/c/6318/ patch, ESTALE is returned for a lookukp on non-existent GFID. But ENOENT is more appropriate when lookup happens through virtual .gfid directory on aux-gfid-mount point. This is avoids confusion for the consumers of gfid-access-translator like geo-rep which expects ENOENT. Change-Id: I4add2edf5958bb59ce55d02726e6b3e801b101bb BUG: 1069191 Signed-off-by: Kotresh H R Reviewed-on: http://review.gluster.org/7154 Tested-by: Gluster Build System Reviewed-by: Raghavendra G Reviewed-by: Venky Shankar Reviewed-by: Anand Avati --- xlators/features/gfid-access/src/gfid-access.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xlators/features') diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c index 362fdab5a..8e614397c 100644 --- a/xlators/features/gfid-access/src/gfid-access.c +++ b/xlators/features/gfid-access/src/gfid-access.c @@ -666,6 +666,11 @@ ga_virtual_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, buf->ia_ino = temp_ino; unwind: + /* Lookup on non-existing gfid returns ESTALE. + Convert into ENOENT for virtual lookup*/ + if (op_errno == ESTALE) + op_errno = ENOENT; + STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, cbk_inode, buf, xdata, postparent); -- cgit