summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-rpc-ops.c3
-rw-r--r--glusterfsd/src/glusterfsd.c9
-rw-r--r--rpc/xdr/src/cli1-xdr.h1
-rw-r--r--xlators/features/marker/src/marker-quota.c3
-rw-r--r--xlators/features/marker/src/marker-quota.h4
-rw-r--r--xlators/features/marker/src/marker.h1
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c10
8 files changed, 17 insertions, 18 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index bca4c1ac227..366d8742bc6 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -40,6 +40,7 @@
#include "cli-mem-types.h"
#include "compat.h"
+#include "syscall.h"
#include "glusterfs3.h"
#include "portmap.h"
@@ -1377,7 +1378,7 @@ gf_cli3_1_print_limit_list (char *volname, char *limit_list)
snprintf (abspath, sizeof (abspath), "%s/%s", mountdir, path);
- ret = getxattr (abspath, "trusted.limit.list", (void *) ret_str, 4096);
+ ret = sys_lgetxattr (abspath, "trusted.limit.list", (void *) ret_str, 4096);
if (ret < 0) {
cli_out ("%-20s %10s", path, value);
} else {
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 8e1e9ea6d9f..be8c755d5de 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -982,14 +982,14 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
/* parsing command line arguments */
cmd_args->log_level = DEFAULT_LOG_LEVEL;
+
+ cmd_args->mac_compat = GF_OPTION_DISABLE;
#ifdef GF_DARWIN_HOST_OS
- cmd_args->mac_compat = GF_OPTION_DEFERRED;
/* On Darwin machines, O_APPEND is not handled,
* which may corrupt the data
*/
cmd_args->fuse_direct_io_mode = GF_OPTION_DISABLE;
#else
- cmd_args->mac_compat = GF_OPTION_DISABLE;
cmd_args->fuse_direct_io_mode = GF_OPTION_DEFERRED;
#endif
cmd_args->fuse_attribute_timeout = -1;
@@ -1112,6 +1112,11 @@ parse_cmdline (int argc, char *argv[], glusterfs_ctx_t *ctx)
}
}
+#ifdef GF_DARWIN_HOST_OS
+ if (cmd_args->mount_point)
+ cmd_args->mac_compat = GF_OPTION_DEFERRED;
+#endif
+
ret = 0;
out:
return ret;
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h
index 6d65ead6a44..80a2b4633ec 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -26,6 +26,7 @@
#include <rpc/rpc.h>
+#include "xdr-common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 18d76dc589d..4662c989d91 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -1655,7 +1655,6 @@ quota_xattr_state (xlator_t *this,
{
if (buf.ia_type == IA_IFREG ||
buf.ia_type == IA_IFLNK) {
- k ++;
inspect_file_xattr (this, loc, dict, buf);
} else if (buf.ia_type == IA_IFDIR)
inspect_directory_xattr (this, loc, dict, buf);
@@ -1913,8 +1912,6 @@ out:
int32_t
init_quota_priv (xlator_t *this)
{
- strcpy (volname, "quota");
-
return 0;
}
diff --git a/xlators/features/marker/src/marker-quota.h b/xlators/features/marker/src/marker-quota.h
index 802c1d922af..ea433a455ec 100644
--- a/xlators/features/marker/src/marker-quota.h
+++ b/xlators/features/marker/src/marker-quota.h
@@ -32,11 +32,9 @@
#define QUOTA_DIRTY_KEY "trusted.glusterfs.quota.dirty"
#define CONTRIBUTION "contri"
-#define VOL_NAME volname
#define CONTRI_KEY_MAX 512
#define READDIR_BUF 4096
-char volname [40];
#define QUOTA_STACK_DESTROY(_frame, _this) \
do { \
@@ -79,7 +77,7 @@ char volname [40];
char _gfid_unparsed[40]; \
uuid_unparse (_gfid, _gfid_unparsed); \
_ret = snprintf (var, CONTRI_KEY_MAX, QUOTA_XATTR_PREFIX \
- ".%s.%s." CONTRIBUTION, VOL_NAME, \
+ ".%s.%s." CONTRIBUTION, "quota", \
_gfid_unparsed); \
} while (0);
diff --git a/xlators/features/marker/src/marker.h b/xlators/features/marker/src/marker.h
index ea1f5cc0a99..1e62e5cbc84 100644
--- a/xlators/features/marker/src/marker.h
+++ b/xlators/features/marker/src/marker.h
@@ -91,5 +91,4 @@ struct marker_conf{
};
typedef struct marker_conf marker_conf_t;
-int32_t k;
#endif
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 6df894ca740..6abdd822a69 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -3602,9 +3602,7 @@ rb_get_xattr_command (glusterd_volinfo_t *volinfo,
goto out;
}
- ret = lgetxattr (mount_point_path, xattr_key,
- value,
- 8192);
+ ret = sys_lgetxattr (mount_point_path, xattr_key, value, 8192);
if (ret < 0) {
gf_log ("", GF_LOG_DEBUG,
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index f72a468019f..75c175b16b8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -24,7 +24,7 @@
#include <inttypes.h>
#include <sys/resource.h>
-#include <sys/vfs.h>
+#include <sys/statvfs.h>
#include "globals.h"
#include "compat.h"
@@ -58,8 +58,8 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir)
char tmp_filename[PATH_MAX] = {0,};
char value[16] = {0,};
char linkinfo[PATH_MAX] = {0,};
- struct statfs src_statfs = {0,};
- struct statfs dst_statfs = {0,};
+ struct statvfs src_statfs = {0,};
+ struct statvfs dst_statfs = {0,};
if (!volinfo->defrag)
goto out;
@@ -118,12 +118,12 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir)
/* Prevent data movement from a node which has higher
disk-space to a node with lesser */
{
- ret = statfs (full_path, &src_statfs);
+ ret = statvfs (full_path, &src_statfs);
if (ret)
gf_log ("", GF_LOG_INFO, "statfs on %s failed",
full_path);
- ret = statfs (tmp_filename, &dst_statfs);
+ ret = statvfs (tmp_filename, &dst_statfs);
if (ret)
gf_log ("", GF_LOG_INFO, "statfs on %s failed",
tmp_filename);