diff options
-rw-r--r-- | libglusterfs/src/glusterfs.h | 3 | ||||
-rw-r--r-- | xlators/cluster/unify/src/unify.c | 4 | ||||
-rw-r--r-- | xlators/features/path-convertor/src/path.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 2 | ||||
-rw-r--r-- | xlators/protocol/legacy/server/src/server-protocol.c | 4 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 4 | ||||
-rw-r--r-- | xlators/storage/bdb/src/bdb.c | 6 |
7 files changed, 11 insertions, 14 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 213b57b60..3e8567fce 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -129,9 +129,6 @@ #define ZR_FILE_CONTENT_REQUEST(key) (!strncmp(key, ZR_FILE_CONTENT_STR, \ ZR_FILE_CONTENT_STRLEN)) -/* TODO: Should we use PATH-MAX? On some systems it may save space */ -#define ZR_PATH_MAX 4096 - /* GlusterFS's maximum supported Auxilary GIDs */ /* TODO: Keeping it to 200, so that we can fit in 2KB buffer for auth data * in RPC server code, if there is ever need for having more aux-gids, then diff --git a/xlators/cluster/unify/src/unify.c b/xlators/cluster/unify/src/unify.c index 6dc93083d..f3da6d0ba 100644 --- a/xlators/cluster/unify/src/unify.c +++ b/xlators/cluster/unify/src/unify.c @@ -1228,7 +1228,7 @@ unify_open_readlink_cbk (call_frame_t *frame, } else { char *tmp_str = gf_strdup (local->loc1.path); char *tmp_base = dirname (tmp_str); - local->name = GF_CALLOC (1, ZR_PATH_MAX, gf_unify_mt_char); + local->name = GF_CALLOC (1, PATH_MAX, gf_unify_mt_char); strcpy (local->name, tmp_base); strncat (local->name, "/", 1); strcat (local->name, path); @@ -1318,7 +1318,7 @@ unify_open (call_frame_t *frame, unify_open_readlink_cbk, NS(this), NS(this)->fops->readlink, - loc, ZR_PATH_MAX); + loc, PATH_MAX); return 0; } #endif /* GF_DARWIN_HOST_OS */ diff --git a/xlators/features/path-convertor/src/path.c b/xlators/features/path-convertor/src/path.c index f61630535..f2423092e 100644 --- a/xlators/features/path-convertor/src/path.c +++ b/xlators/features/path-convertor/src/path.c @@ -52,7 +52,7 @@ static char * name_this_to_that (xlator_t *xl, const char *path, const char *name) { path_private_t *priv = xl->private; - char priv_path[ZR_PATH_MAX] = {0,}; + char priv_path[PATH_MAX] = {0,}; char *tmp_name = NULL; int32_t path_len = strlen (path); int32_t name_len = strlen (name) - ZR_FILE_CONTENT_STRLEN; diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index ce61ac8bd..af9c0ecd2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -125,7 +125,7 @@ server_getspec (rpcsvc_request_t *req) int32_t op_errno = 0; int32_t spec_fd = -1; size_t file_len = 0; - char filename[ZR_PATH_MAX] = {0,}; + char filename[PATH_MAX] = {0,}; struct stat stbuf = {0,}; char *volume = NULL; char *tmp = NULL; diff --git a/xlators/protocol/legacy/server/src/server-protocol.c b/xlators/protocol/legacy/server/src/server-protocol.c index abd339542..0686398d1 100644 --- a/xlators/protocol/legacy/server/src/server-protocol.c +++ b/xlators/protocol/legacy/server/src/server-protocol.c @@ -5046,7 +5046,7 @@ static int _validate_volfile_checksum (xlator_t *this, char *key, uint32_t checksum) { - char filename[ZR_PATH_MAX] = {0,}; + char filename[PATH_MAX] = {0,}; server_conf_t *conf = NULL; struct _volfile_ctx *temp_volfile = NULL; int ret = 0; @@ -5121,7 +5121,7 @@ mop_getspec (call_frame_t *frame, xlator_t *bound_xl, int32_t spec_fd = -1; size_t file_len = 0; size_t _hdrlen = 0; - char filename[ZR_PATH_MAX] = {0,}; + char filename[PATH_MAX] = {0,}; struct stat stbuf = {0,}; gf_mop_getspec_req_t *req = NULL; uint32_t checksum = 0; diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index f9d79721e..7761f78c4 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -190,7 +190,7 @@ int _validate_volfile_checksum (xlator_t *this, char *key, uint32_t checksum) { - char filename[ZR_PATH_MAX] = {0,}; + char filename[PATH_MAX] = {0,}; server_conf_t *conf = NULL; struct _volfile_ctx *temp_volfile = NULL; int ret = 0; @@ -253,7 +253,7 @@ server_getspec (rpcsvc_request_t *req) int32_t op_errno = ENOENT; int32_t spec_fd = -1; size_t file_len = 0; - char filename[ZR_PATH_MAX] = {0,}; + char filename[PATH_MAX] = {0,}; struct stat stbuf = {0,}; uint32_t checksum = 0; char *key = NULL; diff --git a/xlators/storage/bdb/src/bdb.c b/xlators/storage/bdb/src/bdb.c index d13d5c87e..1a5ef02b2 100644 --- a/xlators/storage/bdb/src/bdb.c +++ b/xlators/storage/bdb/src/bdb.c @@ -1409,8 +1409,8 @@ dir_read: this_entry->buf.st_ino = -1; if (S_ISLNK(this_entry->buf.st_mode)) { - char linkpath[ZR_PATH_MAX] = {0,}; - ret = readlink (entry_path, linkpath, ZR_PATH_MAX); + char linkpath[PATH_MAX] = {0,}; + ret = readlink (entry_path, linkpath, PATH_MAX); if (ret != -1) { linkpath[ret] = '\0'; this_entry->link = gf_strdup (linkpath); @@ -2630,7 +2630,7 @@ bdb_setdents (call_frame_t *frame, trav = entries->next; while (trav) { - char pathname[ZR_PATH_MAX] = {0,}; + char pathname[PATH_MAX] = {0,}; strcpy (pathname, entry_path); strcat (pathname, trav->name); |