diff options
Diffstat (limited to 'xlators')
| -rw-r--r-- | xlators/debug/io-stats/src/io-stats.c | 4 | ||||
| -rw-r--r-- | xlators/encryption/crypt/src/crypt.h | 6 | ||||
| -rw-r--r-- | xlators/features/changelog/lib/src/Makefile.am | 3 | ||||
| -rw-r--r-- | xlators/features/changelog/src/changelog-helpers.c | 4 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/Makefile.am | 11 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-hooks.c | 1 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 2 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 1 | ||||
| -rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 4 | ||||
| -rw-r--r-- | xlators/nfs/server/src/Makefile.am | 2 | ||||
| -rw-r--r-- | xlators/nfs/server/src/nfs.c | 6 | 
11 files changed, 18 insertions, 26 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 8cc4bf13bf1..988182acb63 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -724,13 +724,13 @@ io_stats_dump_global_to_logfp (xlator_t *this, struct ios_global_stats *stats,                  ios_log (this, logfp, "\nTIMESTAMP \t\t\t THROUGHPUT(KBPS)"                           "\tFILE NAME");                  list_head = &conf->thru_list[IOS_STATS_THRU_READ]; -                ios_dump_throughput_stats(list_head, this, logfp, IOS_STATS_THRU_READ); +                ios_dump_throughput_stats(list_head, this, logfp, IOS_STATS_TYPE_READ);                  ios_log (this, logfp, "\n======Write Throughput File Stats======");                  ios_log (this, logfp, "\nTIMESTAMP \t\t\t THROUGHPUT(KBPS)"                           "\tFILE NAME");                  list_head = &conf->thru_list[IOS_STATS_THRU_WRITE]; -                ios_dump_throughput_stats (list_head, this, logfp, IOS_STATS_THRU_WRITE); +                ios_dump_throughput_stats (list_head, this, logfp, IOS_STATS_TYPE_WRITE);          }          return 0;  } diff --git a/xlators/encryption/crypt/src/crypt.h b/xlators/encryption/crypt/src/crypt.h index b7aefc3d2c5..4a87f016089 100644 --- a/xlators/encryption/crypt/src/crypt.h +++ b/xlators/encryption/crypt/src/crypt.h @@ -39,14 +39,10 @@  #define MASTER_VOL_KEY_SIZE (32)  #define NMTD_VOL_KEY_SIZE (16) -#if defined(GF_BSD_HOST_OS) +#if !defined(GF_LINUX_HOST_OS)  typedef off_t loff_t;  #endif -#if defined(GF_DARWIN_HOST_OS) -typedef uint64_t loff_t; -#endif -  struct crypt_key {  	uint32_t len;  	const char *label; diff --git a/xlators/features/changelog/lib/src/Makefile.am b/xlators/features/changelog/lib/src/Makefile.am index 28d5a70aab2..1ae919bfb38 100644 --- a/xlators/features/changelog/lib/src/Makefile.am +++ b/xlators/features/changelog/lib/src/Makefile.am @@ -6,8 +6,7 @@ libgfchangelog_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 -fpic \  				-I$(top_srcdir)/xlators/features/changelog/src \  				-DDATADIR=\"$(localstatedir)\" -libgfchangelog_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \ -			$(GF_GLUSTERFS_LIBS) +libgfchangelog_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la  libgfchangelog_la_LDFLAGS = $(GF_LDFLAGS) -version-info $(LIBGFCHANGELOG_LT_VERSION) diff --git a/xlators/features/changelog/src/changelog-helpers.c b/xlators/features/changelog/src/changelog-helpers.c index ba3367b339a..07c6096dce5 100644 --- a/xlators/features/changelog/src/changelog-helpers.c +++ b/xlators/features/changelog/src/changelog-helpers.c @@ -25,7 +25,7 @@  #include "changelog-encoders.h"  #include <pthread.h> -inline void +static inline void  __mask_cancellation (xlator_t *this)  {          int ret = 0; @@ -36,7 +36,7 @@ __mask_cancellation (xlator_t *this)                          "failed to disable thread cancellation");  } -inline void +static inline void  __unmask_cancellation (xlator_t *this)  {          int ret = 0; diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am index d8a1e257c4e..913a2a70729 100644 --- a/xlators/mgmt/glusterd/src/Makefile.am +++ b/xlators/mgmt/glusterd/src/Makefile.am @@ -41,10 +41,9 @@ AM_LDFLAGS = -L$(xlatordir)  CLEANFILES =  install-data-hook: - -if GF_INSTALL_VAR_LIB_GLUSTERD -	$(mkdir_p) $(localstatedir)/lib/ -	(stat $(sysconfdir)/glusterd && \ -	    mv $(sysconfdir)/glusterd $(localstatedir)/lib/) || true; -	(ln -sf $(localstatedir)/lib/glusterd $(sysconfdir)/glusterd) || true; +if GF_INSTALL_GLUSTERD_WORKDIR +	$(mkdir_p) $(DESTDIR)$(GLUSTERD_WORKDIR) +	(stat $(DESTDIR)$(sysconfdir)/glusterd && \ +	    mv $(DESTDIR)$(sysconfdir)/glusterd $(DESTDIR)$(GLUSTERD_WORKDIR)) || true; +	(ln -sf $(DESTDIR)$(GLUSTERD_WORKDIR) $(sysconfdir)/glusterd) || true;  endif diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.c b/xlators/mgmt/glusterd/src/glusterd-hooks.c index 2d402b0dd56..f36764e4832 100644 --- a/xlators/mgmt/glusterd/src/glusterd-hooks.c +++ b/xlators/mgmt/glusterd/src/glusterd-hooks.c @@ -260,6 +260,7 @@ glusterd_hooks_add_op_args (runner_t *runner, glusterd_op_t op,                  case GD_OP_SET_VOLUME:                          ret = glusterd_hooks_set_volume_args (op_ctx, runner); +                        glusterd_hooks_add_working_dir (runner, priv);                          break;                  case GD_OP_GSYNC_CREATE: diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index c5fa245dbd8..b59353566a7 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1199,7 +1199,7 @@ init (xlator_t *this)                  first_time = 1;          } -        setenv ("GLUSTERD_WORKING_DIR", workdir, 1); +        setenv ("GLUSTERD_WORKDIR", workdir, 1);          gf_log (this->name, GF_LOG_INFO, "Using %s as working directory",                  workdir); diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index f7b4f012e03..f1139ad027d 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -464,7 +464,6 @@ enum glusterd_vol_comp_status_ {          GLUSTERD_VOL_COMP_RJT,  }; -#define GLUSTERD_DEFAULT_WORKDIR "/var/lib/glusterd"  #define GLUSTERD_DEFAULT_PORT    GF_DEFAULT_BASE_PORT  #define GLUSTERD_INFO_FILE      "glusterd.info"  #define GLUSTERD_VOLUME_QUOTA_CONFIG "quota.conf" diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 55d0c51de18..cace3c247eb 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -338,9 +338,9 @@ check_recursive_mount ()      fi      # check if the mount point is a brick's parent directory -    GLUSTERD_WORKDIR="/var/lib/glusterd"; +    GLUSTERD_WORKDIR="@GLUSTERD_WORKDIR@"; -    ls -L "$GLUSTERD_WORKDIR"/vols/*/bricks/* > /dev/null 2>&1; +    ls -L "${GLUSTERD_WORKDIR}"/vols/*/bricks/* > /dev/null 2>&1;      if [ $? -ne 0 ]; then          return;      fi diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am index 62fbf6535ca..32d93812b50 100644 --- a/xlators/nfs/server/src/Makefile.am +++ b/xlators/nfs/server/src/Makefile.am @@ -15,7 +15,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \  	-DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \  	-I$(top_srcdir)/libglusterfs/src \  	-I$(nfsrpclibdir) -I$(CONTRIBDIR)/rbtree \ -	-I$(top_srcdir)/rpc/xdr/src/ +	-I$(top_srcdir)/rpc/xdr/src/ -DDATADIR=\"$(localstatedir)\"  AM_CFLAGS = -Wall $(GF_CFLAGS) diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 422b7fa6c12..794b7171efc 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -43,9 +43,7 @@  #define OPT_SERVER_RPC_STATD_PIDFILE     "nfs.rpc-statd-pidfile"  #define OPT_SERVER_RPC_STATD_NOTIFY_PIDFILE "nfs.rpc-statd-notify-pidfile" -/* TODO: DATADIR should be based on configure's $(localstatedir) */ -#define DATADIR                         "/var/lib/glusterd" -#define NFS_DATADIR                     DATADIR "/nfs" +#define NFS_DATADIR                     GLUSTERD_DEFAULT_WORKDIR "/nfs"  /* Forward declaration */  int nfs_add_initer (struct list_head *list, nfs_version_initer_t init); @@ -1853,7 +1851,7 @@ struct volume_options options[] = {          },          { .key = {"nfs.mount-rmtab"},            .type = GF_OPTION_TYPE_PATH, -          .default_value = DATADIR "/rmtab", +          .default_value = NFS_DATADIR "/rmtab",            .description = "Set the location of the cache file that is used to "                           "list all the NFS-clients that have connected "                           "through the MOUNT protocol. If this is on shared "  | 
