summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2014-03-04 14:42:40 +0000
committerJeff Darcy <jdarcy@redhat.com>2014-03-04 14:42:40 +0000
commit0de07f4189cbd191a765c60ed3d7c72f72112e68 (patch)
tree83781a0df06c9110c6f3db12caad23ea00832b53 /xlators/features
parentc28972ea53cc7cdb91c7aac01754dd7f0b66e1a7 (diff)
parent9f45d0f6212d6d5c96dafc4aba73d9d12b39c3d6 (diff)
Merge branch 'upstream' into merge
Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Conflicts: api/src/glfs-fops.c libglusterfs/src/syncop.c libglusterfs/src/syncop.h Change-Id: I8c3fa7a20fb167d9e6bc2749e177c0c8b366827b
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/compress/src/cdc.c78
-rw-r--r--xlators/features/gfid-access/src/gfid-access.c5
-rw-r--r--xlators/features/glupy/src/Makefile.am6
-rw-r--r--xlators/features/marker/src/marker.c2
4 files changed, 48 insertions, 43 deletions
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}
},
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);
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 =
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);