Porting new log messages for posix

Change-Id: I29bdeefb755805858e3cb1817b679cb6f9a476a9
BUG: 1194640
Signed-off-by: Hari Gowtham <hgowtham@dhcp35-85.lab.eng.blr.redhat.com>
Reviewed-on: http://review.gluster.org/9893
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
Hari Gowtham 2015-05-27 13:17:30 +05:30 committed by Niels de Vos
parent 1950f30ee7
commit 59e1c79ac6
9 changed files with 1872 additions and 891 deletions

View File

@ -36,7 +36,7 @@
*/
#define GLFS_COMP_BASE GLFS_MSGID_COMP_GLUSTERFSD
#define GLFS_NUM_MESSAGES 33
#define GLFS_NUM_MESSAGES 34
#define GLFS_MSGID_END (GLFS_COMP_BASE + GLFS_NUM_MESSAGES + 1)
/* Messaged with message IDs */
#define glfs_msg_start_x GLFS_COMP_BASE, "Invalid: Start of messages"

View File

@ -60,6 +60,7 @@
#define GLFS_MSGID_COMP_DHT_END GLFS_MSGID_COMP_DHT +\
GLFS_MSGID_SEGMENT
/* there is no component called 'common', however reserving this segment
* for common actions/errors like dict_{get/set}, memory accounting*/

View File

@ -8,7 +8,8 @@ posix_la_SOURCES = posix.c posix-helpers.c posix-handle.c posix-aio.c
posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBAIO) \
$(ACL_LIBS)
noinst_HEADERS = posix.h posix-mem-types.h posix-handle.h posix-aio.h
noinst_HEADERS = posix.h posix-mem-types.h posix-handle.h posix-aio.h \
posix-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/rpc/xdr/src \

View File

@ -11,6 +11,7 @@
#include "glusterfs.h"
#include "posix.h"
#include <sys/uio.h>
#include "posix-messages.h"
#ifdef HAVE_LIBAIO
#include <libaio.h>
@ -50,9 +51,9 @@ __posix_fd_set_odirect (fd_t *fd, struct posix_fd *pfd, int opflags,
}
if (ret) {
gf_log (THIS->name, GF_LOG_WARNING,
"fcntl() failed (%s). fd=%d flags=%d pfd->odirect=%d",
strerror (errno), pfd->fd, flags, pfd->odirect);
gf_msg (THIS->name, GF_LOG_WARNING, errno, P_MSG_FCNTL_FAILED,
"fcntl() failed. fd=%d flags=%d pfd->odirect=%d",
pfd->fd, flags, pfd->odirect);
}
}
@ -96,11 +97,11 @@ posix_aio_readv_complete (struct posix_aio_cb *paiocb, int res, int res2)
if (res < 0) {
op_ret = -1;
op_errno = -res;
gf_log (this->name, GF_LOG_ERROR,
"readv(async) failed fd=%d,size=%lu,offset=%llu (%d/%s)",
gf_msg (this->name, GF_LOG_ERROR, op_errno, P_MSG_READV_FAILED,
"readv(async) failed fd=%d,size=%lu,offset=%llu (%d)",
_fd, paiocb->iocb.u.c.nbytes,
(unsigned long long) paiocb->offset,
res, strerror (op_errno));
res);
goto out;
}
@ -108,9 +109,8 @@ posix_aio_readv_complete (struct posix_aio_cb *paiocb, int res, int res2)
if (ret != 0) {
op_ret = -1;
op_errno = errno;
gf_log (this->name, GF_LOG_ERROR,
"fstat failed on fd=%d: %s", _fd,
strerror (op_errno));
gf_msg (this->name, GF_LOG_ERROR, op_errno, P_MSG_FSTAT_FAILED,
"fstat failed on fd=%d", _fd);
goto out;
}
@ -177,7 +177,7 @@ posix_aio_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = posix_fd_ctx_get (fd, this, &pfd);
if (ret < 0) {
op_errno = -ret;
gf_log (this->name, GF_LOG_WARNING,
gf_msg (this->name, GF_LOG_WARNING, op_errno, P_MSG_PFD_NULL,
"pfd is NULL from fd=%p", fd);
goto err;
}
@ -185,7 +185,8 @@ posix_aio_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
if (!size) {
op_errno = EINVAL;
gf_log (this->name, GF_LOG_WARNING, "size=%"GF_PRI_SIZET, size);
gf_msg (this->name, GF_LOG_WARNING, op_errno,
P_MSG_INVALID_ARGUMENT, "size=%"GF_PRI_SIZET, size);
goto err;
}
@ -227,9 +228,10 @@ posix_aio_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
UNLOCK (&fd->lock);
if (ret != 1) {
gf_log (this->name, GF_LOG_ERROR,
"io_submit() returned %d", ret);
op_errno = -ret;
gf_msg (this->name, GF_LOG_ERROR, op_errno,
P_MSG_IO_SUBMIT_FAILED,
"io_submit() returned %d", ret);
goto err;
}
@ -269,10 +271,10 @@ posix_aio_writev_complete (struct posix_aio_cb *paiocb, int res, int res2)
if (res < 0) {
op_ret = -1;
op_errno = -res;
gf_log (this->name, GF_LOG_ERROR,
"writev(async) failed fd=%d,offset=%llu (%d/%s)",
_fd, (unsigned long long) paiocb->offset, res,
strerror (op_errno));
gf_msg (this->name, GF_LOG_ERROR, op_errno,
P_MSG_WRITEV_FAILED,
"writev(async) failed fd=%d,offset=%llu (%d)",
_fd, (unsigned long long) paiocb->offset, res);
goto out;
}
@ -281,9 +283,8 @@ posix_aio_writev_complete (struct posix_aio_cb *paiocb, int res, int res2)
if (ret != 0) {
op_ret = -1;
op_errno = errno;
gf_log (this->name, GF_LOG_ERROR,
"fstat failed on fd=%d: %s", _fd,
strerror (op_errno));
gf_msg (this->name, GF_LOG_ERROR, op_errno, P_MSG_FSTAT_FAILED,
"fstat failed on fd=%d", _fd);
goto out;
}
@ -334,7 +335,7 @@ posix_aio_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = posix_fd_ctx_get (fd, this, &pfd);
if (ret < 0) {
op_errno = -ret;
gf_log (this->name, GF_LOG_WARNING,
gf_msg (this->name, GF_LOG_WARNING, op_errno, P_MSG_PFD_NULL,
"pfd is NULL from fd=%p", fd);
goto err;
}
@ -366,9 +367,8 @@ posix_aio_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = posix_fdstat (this, _fd, &paiocb->prebuf);
if (ret != 0) {
op_errno = errno;
gf_log (this->name, GF_LOG_ERROR,
"fstat failed on fd=%p: %s", fd,
strerror (op_errno));
gf_msg (this->name, GF_LOG_ERROR, op_errno, P_MSG_FSTAT_FAILED,
"fstat failed on fd=%p", fd);
goto err;
}
@ -383,9 +383,11 @@ posix_aio_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
UNLOCK (&fd->lock);
if (ret != 1) {
gf_log (this->name, GF_LOG_ERROR,
"io_submit() returned %d", ret);
op_errno = -ret;
gf_msg (this->name, GF_LOG_ERROR, op_errno,
P_MSG_IO_SUBMIT_FAILED,
"io_submit() returned %d,gfid=%s", ret,
uuid_utoa(fd->inode->gfid));
goto err;
}
@ -423,7 +425,8 @@ posix_aio_thread (void *data)
ret = io_getevents (priv->ctxp, 1, POSIX_AIO_MAX_NR_GETEVENTS,
&events[0], NULL);
if (ret <= 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, -ret,
P_MSG_IO_GETEVENTS_FAILED,
"io_getevents() returned %d", ret);
if (ret == -EINTR)
continue;
@ -445,7 +448,8 @@ posix_aio_thread (void *data)
event->res2);
break;
default:
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0,
P_MSG_UNKNOWN_OP,
"unknown op %d found in piocb",
paiocb->op);
break;
@ -467,7 +471,7 @@ posix_aio_init (xlator_t *this)
ret = io_setup (POSIX_AIO_MAX_NR_EVENTS, &priv->ctxp);
if ((ret == -1 && errno == ENOSYS) || ret == -ENOSYS) {
gf_log (this->name, GF_LOG_WARNING,
gf_msg (this->name, GF_LOG_WARNING, 0, P_MSG_AIO_UNAVAILABLE,
"Linux AIO not available at run-time."
" Continuing with synchronous IO");
ret = 0;
@ -475,9 +479,10 @@ posix_aio_init (xlator_t *this)
}
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
"io_setup() failed. ret=%d, errno=%d",
ret, errno);
gf_msg (this->name, GF_LOG_WARNING, -ret,
P_MSG_IO_SETUP_FAILED,
"io_setup() failed. ret=%d",
ret);
goto out;
}
@ -536,7 +541,7 @@ posix_aio_off (xlator_t *this)
int
posix_aio_on (xlator_t *this)
{
gf_log (this->name, GF_LOG_INFO,
gf_msg (this->name, GF_LOG_INFO, 0, P_MSG_AIO_UNAVAILABLE,
"Linux AIO not available at build-time."
" Continuing with synchronous IO");
return 0;
@ -545,7 +550,7 @@ posix_aio_on (xlator_t *this)
int
posix_aio_off (xlator_t *this)
{
gf_log (this->name, GF_LOG_INFO,
gf_msg (this->name, GF_LOG_INFO, 0, P_MSG_AIO_UNAVAILABLE,
"Linux AIO not available at build-time."
" Continuing with synchronous IO");
return 0;
@ -556,9 +561,10 @@ __posix_fd_set_odirect (fd_t *fd, struct posix_fd *pfd, int opflags,
off_t offset, size_t size)
{
xlator_t *this = THIS;
gf_log (this->name, GF_LOG_INFO,
gf_msg (this->name, GF_LOG_INFO, 0, P_MSG_AIO_UNAVAILABLE,
"Linux AIO not available at build-time."
" Continuing with synchronous IO");
return;
}
#endif

View File

@ -20,6 +20,7 @@
#include "posix.h"
#include "xlator.h"
#include "syscall.h"
#include "posix-messages.h"
#include "compat-errno.h"
@ -67,12 +68,8 @@ posix_make_ancestral_node (const char *priv_base_path, char *path, int pathsize,
if (type & POSIX_ANCESTRY_DENTRY) {
entry = gf_dirent_for_name (dir_name);
if (!entry) {
gf_log (THIS->name, GF_LOG_ERROR,
"could not create gf_dirent for entry %s: (%s)",
dir_name, strerror (errno));
if (!entry)
goto out;
}
entry->d_stat = *iabuf;
entry->inode = inode_ref (inode);
@ -147,9 +144,9 @@ posix_make_ancestryfromgfid (xlator_t *this, char *path, int pathsize,
len = readlink (dir_handle, linkname, PATH_MAX);
if (len < 0) {
gf_log (this->name, GF_LOG_ERROR, "could not read the link "
"from the gfid handle %s (%s)", dir_handle,
strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_READLINK_FAILED,
"could not read the link from the gfid handle %s ",
dir_handle);
goto out;
}
@ -240,9 +237,9 @@ posix_handle_pump (xlator_t *this, char *buf, int len, int maxlen,
/* is a directory's symlink-handle */
ret = readlink (base_str, linkname, 512);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
"internal readlink failed on %s (%s)",
base_str, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_READLINK_FAILED,
"internal readlink failed on %s ",
base_str);
goto err;
}
@ -259,14 +256,14 @@ posix_handle_pump (xlator_t *this, char *buf, int len, int maxlen,
}
if (ret < 50 || ret >= 512) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_LINK_FAILED,
"malformed internal link %s for %s",
linkname, base_str);
goto err;
}
if (memcmp (linkname, "../../", 6) != 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_HANDLEPATH_FAILED,
"malformed internal link %s for %s",
linkname, base_str);
goto err;
@ -277,7 +274,7 @@ posix_handle_pump (xlator_t *this, char *buf, int len, int maxlen,
(linkname[8] != '/') ||
(linkname[11] != '/') ||
(linkname[48] != '/')) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_HANDLEPATH_FAILED,
"malformed internal link %s for %s",
linkname, base_str);
goto err;
@ -287,7 +284,7 @@ posix_handle_pump (xlator_t *this, char *buf, int len, int maxlen,
(linkname[25] != '-') ||
(linkname[30] != '-') ||
(linkname[35] != '-')) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_HANDLEPATH_FAILED,
"malformed internal link %s for %s",
linkname, base_str);
goto err;
@ -296,7 +293,7 @@ posix_handle_pump (xlator_t *this, char *buf, int len, int maxlen,
blen = link_len - 48;
if (len + blen >= maxlen) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_HANDLEPATH_FAILED,
"Unable to form handle path for %s (maxlen = %d)",
buf, maxlen);
goto err;
@ -456,7 +453,8 @@ posix_handle_init (xlator_t *this)
ret = stat (priv->base_path, &exportbuf);
if (ret || !S_ISDIR (exportbuf.st_mode)) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0,
P_MSG_HANDLE_CREATE,
"Not a directory: %s", priv->base_path);
return -1;
}
@ -472,21 +470,24 @@ posix_handle_init (xlator_t *this)
if (errno == ENOENT) {
ret = mkdir (handle_pfx, 0600);
if (ret != 0) {
gf_log (this->name, GF_LOG_ERROR,
"Creating directory %s failed: %s",
handle_pfx, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_CREATE,
"Creating directory %s failed",
handle_pfx);
return -1;
}
} else {
gf_log (this->name, GF_LOG_ERROR,
"Checking for %s failed: %s",
handle_pfx, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_CREATE,
"Checking for %s failed",
handle_pfx);
return -1;
}
break;
case 0:
if (!S_ISDIR (stbuf.st_mode)) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0,
P_MSG_HANDLE_CREATE,
"Not a directory: %s",
handle_pfx);
return -1;
@ -504,25 +505,26 @@ posix_handle_init (xlator_t *this)
switch (ret) {
case -1:
if (errno != ENOENT) {
gf_log (this->name, GF_LOG_ERROR,
"%s: %s", priv->base_path,
strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_CREATE,
"%s", priv->base_path);
return -1;
}
ret = posix_handle_mkdir_hashes (this, rootstr);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"mkdir %s failed (%s)",
rootstr, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE,
"mkdir %s failed", rootstr);
return -1;
}
ret = symlink ("../../..", rootstr);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"symlink %s creation failed (%s)",
rootstr, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_CREATE,
"symlink %s creation failed",
rootstr);
return -1;
}
break;
@ -531,7 +533,8 @@ posix_handle_init (xlator_t *this)
(exportbuf.st_dev == rootbuf.st_dev))
return 0;
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0,
P_MSG_HANDLE_CREATE,
"Different dirs %s (%lld/%lld) != %s (%lld/%lld)",
priv->base_path, (long long) exportbuf.st_ino,
(long long) exportbuf.st_dev, rootstr,
@ -573,18 +576,21 @@ posix_handle_new_trash_init (xlator_t *this, char *trash)
if (errno == ENOENT) {
ret = mkdir (trash, 0755);
if (ret != 0) {
gf_log (this->name, GF_LOG_ERROR,
"Creating directory %s failed: %s",
trash, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_TRASH_CREATE,
"Creating directory %s failed",
trash);
}
} else {
gf_log (this->name, GF_LOG_ERROR, "Checking for %s "
"failed: %s", trash, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_TRASH_CREATE,
"Checking for %s failed", trash);
}
break;
case 0:
if (!S_ISDIR (stbuf.st_mode)) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_TRASH_CREATE,
"Not a directory: %s", trash);
ret = -1;
}
@ -609,8 +615,9 @@ posix_mv_old_trash_into_new_trash (xlator_t *this, char *old, char *new)
uuid_utoa (dest_name));
ret = rename (old, dest_old);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR, "Not able to move "
"%s -> %s (%s)", old, dest_old, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_TRASH_CREATE,
"Not able to move %s -> %s ", old, dest_old);
}
out:
return ret;
@ -659,9 +666,9 @@ posix_handle_mkdir_hashes (xlator_t *this, const char *newpath)
ret = mkdir (parpath, 0700);
if (ret == -1 && errno != EEXIST) {
gf_log (this->name, GF_LOG_ERROR,
"error mkdir hash-1 %s (%s)",
parpath, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_CREATE,
"error mkdir hash-1 %s ", parpath);
return -1;
}
@ -670,9 +677,9 @@ posix_handle_mkdir_hashes (xlator_t *this, const char *newpath)
ret = mkdir (parpath, 0700);
if (ret == -1 && errno != EEXIST) {
gf_log (this->name, GF_LOG_ERROR,
"error mkdir hash-2 %s (%s)",
parpath, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_HANDLE_CREATE,
"error mkdir hash-2 %s ", parpath);
return -1;
}
@ -692,41 +699,43 @@ posix_handle_hard (xlator_t *this, const char *oldpath, uuid_t gfid, struct stat
ret = lstat (newpath, &newbuf);
if (ret == -1 && errno != ENOENT) {
gf_log (this->name, GF_LOG_WARNING,
"%s: %s", newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE,
"%s", newpath);
return -1;
}
if (ret == -1 && errno == ENOENT) {
ret = posix_handle_mkdir_hashes (this, newpath);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"mkdir %s failed (%s)",
newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE, "mkdir %s failed ",
newpath);
return -1;
}
ret = sys_link (oldpath, newpath);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"link %s -> %s failed (%s)",
oldpath, newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE, "link %s -> %s"
"failed ", oldpath, newpath);
return -1;
}
ret = lstat (newpath, &newbuf);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"lstat on %s failed (%s)",
newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE,
"lstat on %s failed", newpath);
return -1;
}
}
if (newbuf.st_ino != oldbuf->st_ino ||
newbuf.st_dev != oldbuf->st_dev) {
gf_log (this->name, GF_LOG_WARNING,
gf_msg (this->name, GF_LOG_WARNING, 0,
P_MSG_HANDLE_CREATE,
"mismatching ino/dev between file %s (%lld/%lld) "
"and handle %s (%lld/%lld)",
oldpath, (long long) oldbuf->st_ino, (long long) oldbuf->st_dev,
@ -752,41 +761,43 @@ posix_handle_soft (xlator_t *this, const char *real_path, loc_t *loc,
ret = lstat (newpath, &newbuf);
if (ret == -1 && errno != ENOENT) {
gf_log (this->name, GF_LOG_WARNING,
"%s: %s", newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE, "%s", newpath);
return -1;
}
if (ret == -1 && errno == ENOENT) {
ret = posix_handle_mkdir_hashes (this, newpath);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"mkdir %s failed (%s)",
newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE,
"mkdir %s failed ", newpath);
return -1;
}
ret = symlink (oldpath, newpath);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"symlink %s -> %s failed (%s)",
oldpath, newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE,
"symlink %s -> %s failed",
oldpath, newpath);
return -1;
}
ret = lstat (newpath, &newbuf);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"stat on %s failed (%s)",
newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE,
"stat on %s failed ", newpath);
return -1;
}
}
ret = stat (real_path, &newbuf);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"stat on %s failed (%s)", newpath, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_CREATE,
"stat on %s failed ", newpath);
return -1;
}
@ -795,7 +806,8 @@ posix_handle_soft (xlator_t *this, const char *real_path, loc_t *loc,
if (newbuf.st_ino != oldbuf->st_ino ||
newbuf.st_dev != oldbuf->st_dev) {
gf_log (this->name, GF_LOG_WARNING,
gf_msg (this->name, GF_LOG_WARNING, 0,
P_MSG_HANDLE_CREATE,
"mismatching ino/dev between file %s (%lld/%lld) "
"and handle %s (%lld/%lld)",
oldpath, (long long) oldbuf->st_ino, (long long) oldbuf->st_dev,
@ -820,16 +832,16 @@ posix_handle_unset_gfid (xlator_t *this, uuid_t gfid)
if (ret == -1) {
if (errno != ENOENT) {
gf_log (this->name, GF_LOG_WARNING,
"%s: %s", path, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_DELETE, "%s", path);
}
goto out;
}
ret = unlink (path);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"unlink %s failed (%s)", path, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_DELETE, "unlink %s failed ", path);
}
out:
@ -851,7 +863,8 @@ posix_handle_unset (xlator_t *this, uuid_t gfid, const char *basename)
MAKE_HANDLE_PATH (path, this, gfid, basename);
if (!path) {
gf_log (this->name, GF_LOG_WARNING,
gf_msg (this->name, GF_LOG_WARNING, 0,
P_MSG_HANDLE_DELETE,
"Failed to create handle path for %s (%s)",
basename, uuid_utoa(gfid));
return -1;
@ -860,8 +873,8 @@ posix_handle_unset (xlator_t *this, uuid_t gfid, const char *basename)
ret = posix_istat (this, gfid, basename, &stat);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"%s: %s", path, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HANDLE_DELETE, "%s", path);
return -1;
}
@ -881,7 +894,8 @@ posix_create_link_if_gfid_exists (xlator_t *this, uuid_t gfid,
MAKE_HANDLE_PATH (newpath, this, gfid, NULL);
if (!newpath) {
gf_log (this->name, GF_LOG_WARNING,
gf_msg (this->name, GF_LOG_WARNING, 0,
P_MSG_HANDLE_CREATE,
"Failed to create handle path (%s)", uuid_utoa(gfid));
return ret;
}

View File

@ -14,6 +14,7 @@
#include <sys/types.h>
#include "xlator.h"
#include "gf-dirent.h"
#include "posix-messages.h"
/* From Open Group Base Specifications Issue 6 */
#ifndef _XOPEN_PATH_MAX
@ -45,9 +46,9 @@
flags); \
if (op_ret == -1) { \
op_errno = errno; \
gf_log (this->name, GF_LOG_WARNING, \
"setting xattr failed on %s: key = %s (%s)", \
path, key, strerror (op_errno)); \
gf_msg (this->name, GF_LOG_WARNING, errno, P_MSG_PGFID_OP, \
"setting xattr failed on %s: key = %s ", \
path, key); \
goto label; \
} \
} while (0)
@ -62,9 +63,10 @@
SET_PGFID_XATTR (path, key, value, flags, \
op_ret, this, label); \
} else { \
gf_log(this->name, GF_LOG_WARNING, "getting " \
"xattr failed on %s: key = %s (%s)", \
path, key, strerror (op_errno)); \
gf_msg (this->name, GF_LOG_WARNING, op_errno, \
P_MSG_PGFID_OP, "getting xattr " \
"failed on %s: key = %s ", \
path, key); \
} \
} \
} while (0)
@ -73,9 +75,10 @@
op_ret = sys_lremovexattr (path, key); \
if (op_ret == -1) { \
op_errno = errno; \
gf_log (this->name, GF_LOG_WARNING, "removing xattr " \
"failed on %s: key = %s (%s)", path, key, \
strerror (op_errno)); \
gf_msg (this->name, GF_LOG_WARNING, op_errno, \
P_MSG_PGFID_OP, \
"removing xattr failed" \
"on %s: key = %s", path, key); \
goto label; \
} \
} while (0)
@ -88,9 +91,9 @@
if (op_errno == ENOATTR || op_errno == ENODATA) { \
value = 1; \
} else { \
gf_log (this->name, GF_LOG_WARNING,"getting xattr " \
"failed on %s: key = %s (%s)", path, key, \
strerror (op_errno)); \
gf_msg (this->name, GF_LOG_WARNING, errno, \
P_MSG_PGFID_OP, "getting xattr " \
"failed on %s: key = %s ", path, key); \
goto label; \
} \
} else { \
@ -105,8 +108,9 @@
op_ret = sys_lgetxattr (path, key, &value, sizeof (value)); \
if (op_ret == -1) { \
op_errno = errno; \
gf_log (this->name, GF_LOG_WARNING, "getting xattr failed on " \
"%s: key = %s (%s)", path, key, strerror (op_errno)); \
gf_msg (this->name, GF_LOG_WARNING, errno, \
P_MSG_PGFID_OP, "getting xattr failed on " \
"%s: key = %s ", path, key); \
goto label; \
} else { \
value = ntoh32 (value); \
@ -177,7 +181,8 @@
#define MAKE_INODE_HANDLE(rpath, this, loc, iatt_p) do { \
if (gf_uuid_is_null (loc->gfid)) { \
gf_log (this->name, GF_LOG_ERROR, \
gf_msg (this->name, GF_LOG_ERROR, 0, \
P_MSG_INODE_HANDLE_CREATE, \
"null gfid for path %s", (loc)->path); \
break; \
} \
@ -189,12 +194,13 @@
errno = 0; \
op_ret = posix_istat (this, loc->gfid, NULL, iatt_p); \
if (errno != ELOOP) { \
MAKE_HANDLE_PATH (rpath, this, (loc)->gfid, NULL); \
MAKE_HANDLE_PATH (rpath, this, (loc)->gfid, NULL); \
if (!rpath) { \
op_ret = -1; \
gf_log (this->name, GF_LOG_ERROR, \
"Failed to create inode handle " \
"for path %s", (loc)->path); \
gf_msg (this->name, GF_LOG_ERROR, errno, \
P_MSG_INODE_HANDLE_CREATE, \
"Failed to create inode handle " \
"for path %s", (loc)->path); \
} \
break; \
} \
@ -206,7 +212,7 @@
char *__parp; \
\
if (gf_uuid_is_null (loc->pargfid) || !loc->name) { \
gf_log (this->name, GF_LOG_ERROR, \
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_ENTRY_HANDLE_CREATE,\
"null pargfid/name for path %s", loc->path); \
break; \
} \
@ -224,9 +230,10 @@
MAKE_HANDLE_PATH (parp, this, loc->pargfid, NULL); \
MAKE_HANDLE_PATH (entp, this, loc->pargfid, loc->name); \
if (!parp || !entp) { \
gf_log (this->name, GF_LOG_ERROR, \
"Failed to create entry handle " \
"for path %s", loc->path); \
gf_msg (this->name, GF_LOG_ERROR, errno, \
P_MSG_ENTRY_HANDLE_CREATE, \
"Failed to create entry handle " \
"for path %s", loc->path); \
} \
break; \
} \

View File

@ -138,11 +138,13 @@ _posix_xattr_get_set_from_backend (posix_xattr_filler_t *filler, char *key)
xattr_size);
if (xattr_size == -1) {
if (filler->real_path)
gf_log (filler->this->name, GF_LOG_WARNING,
gf_msg (filler->this->name, GF_LOG_WARNING, 0,
P_MSG_XATTR_FAILED,
"getxattr failed. path: %s, key: %s",
filler->real_path, key);
else
gf_log (filler->this->name, GF_LOG_WARNING,
gf_msg (filler->this->name, GF_LOG_WARNING, 0,
P_MSG_XATTR_FAILED,
"getxattr failed. gfid: %s, key: %s",
uuid_utoa (filler->fd->inode->gfid),
key);
@ -154,11 +156,11 @@ _posix_xattr_get_set_from_backend (posix_xattr_filler_t *filler, char *key)
ret = dict_set_bin (filler->xattr, key, value, xattr_size);
if (ret < 0) {
if (filler->real_path)
gf_log (filler->this->name, GF_LOG_DEBUG,
gf_msg_debug (filler->this->name, 0,
"dict set failed. path: %s, key: %s",
filler->real_path, key);
else
gf_log (filler->this->name, GF_LOG_DEBUG,
gf_msg_debug (filler->this->name, 0,
"dict set failed. gfid: %s, key: %s",
uuid_utoa (filler->fd->inode->gfid),
key);
@ -193,14 +195,15 @@ _posix_get_marker_all_contributions (posix_xattr_filler_t *filler)
" with 'user_xattr' flag)");
} else {
if (filler->real_path)
gf_log (THIS->name, GF_LOG_WARNING,
"listxattr failed on %s: %s",
filler->real_path, strerror (errno));
gf_msg (THIS->name, GF_LOG_WARNING, errno,
P_MSG_XATTR_FAILED,
"listxattr failed on %s",
filler->real_path);
else
gf_log (THIS->name, GF_LOG_WARNING,
"listxattr failed on %s: %s",
uuid_utoa (filler->fd->inode->gfid),
strerror (errno));
gf_msg (THIS->name, GF_LOG_WARNING, errno,
P_MSG_XATTR_FAILED,
"listxattr failed on %s",
uuid_utoa (filler->fd->inode->gfid));
}
goto out;
}
@ -290,7 +293,8 @@ _posix_filler_get_openfd_count (posix_xattr_filler_t *filler, char *key)
ret = dict_set_uint32 (filler->xattr, key, inode->fd_count);
if (ret < 0) {
gf_log (filler->this->name, GF_LOG_WARNING,
gf_msg (filler->this->name, GF_LOG_WARNING, 0,
P_MSG_DICT_SET_FAILED,
"Failed to set dictionary value for %s", key);
goto out;
}
@ -323,9 +327,10 @@ _posix_xattr_get_set (dict_t *xattr_req, char *key, data_t *data,
if (req_size >= filler->stbuf->ia_size) {
_fd = open (filler->real_path, O_RDONLY);
if (_fd == -1) {
gf_log (filler->this->name, GF_LOG_ERROR,
"Opening file %s failed: %s",
filler->real_path, strerror (errno));
gf_msg (filler->this->name, GF_LOG_ERROR, errno,
P_MSG_XDATA_GETXATTR,
"Opening file %s failed",
filler->real_path);
goto err;
}
@ -347,26 +352,30 @@ _posix_xattr_get_set (dict_t *xattr_req, char *key, data_t *data,
ret = read (_fd, databuf, filler->stbuf->ia_size);
if (ret == -1) {
gf_log (filler->this->name, GF_LOG_ERROR,
"Read on file %s failed: %s",
filler->real_path, strerror (errno));
gf_msg (filler->this->name, GF_LOG_ERROR, errno,
P_MSG_XDATA_GETXATTR,
"Read on file %s failed",
filler->real_path);
goto err;
}
ret = close (_fd);
_fd = -1;
if (ret == -1) {
gf_log (filler->this->name, GF_LOG_ERROR,
"Close on file %s failed: %s",
filler->real_path, strerror (errno));
gf_msg (filler->this->name, GF_LOG_ERROR, errno,
P_MSG_XDATA_GETXATTR,
"Close on file %s failed",
filler->real_path);
goto err;
}
ret = dict_set_bin (filler->xattr, key,
databuf, filler->stbuf->ia_size);
if (ret < 0) {
gf_log (filler->this->name, GF_LOG_ERROR,
"failed to set dict value. key: %s, path: %s",
gf_msg (filler->this->name, GF_LOG_ERROR, 0,
P_MSG_XDATA_GETXATTR,
"failed to set dict value. key: %s,"
"path: %s",
key, filler->real_path);
goto err;
}
@ -380,6 +389,16 @@ _posix_xattr_get_set (dict_t *xattr_req, char *key, data_t *data,
}
} else if (!strcmp (key, GLUSTERFS_OPEN_FD_COUNT)) {
ret = _posix_filler_get_openfd_count (filler, key);
loc = filler->loc;
if (loc) {
ret = dict_set_uint32 (filler->xattr, key,
loc->inode->fd_count);
if (ret < 0)
gf_msg (filler->this->name, GF_LOG_WARNING, 0,
P_MSG_XDATA_GETXATTR,
"Failed to set dictionary value for %s",
key);
}
} else if (!strcmp (key, GET_ANCESTRY_PATH_KEY)) {
/* As of now, the only consumers of POSIX_ANCESTRY_PATH attempt
* fetching it via path-based fops. Hence, leaving it as it is
@ -519,7 +538,8 @@ posix_istat (xlator_t *this, uuid_t gfid, const char *basename,
MAKE_HANDLE_PATH (real_path, this, gfid, basename);
if (!real_path) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, ESTALE,
P_MSG_HANDLE_PATH_CREATE,
"Failed to create handle path for %s/%s",
uuid_utoa (gfid), basename ? basename : "");
errno = ESTALE;
@ -532,16 +552,17 @@ posix_istat (xlator_t *this, uuid_t gfid, const char *basename,
if (ret != 0) {
if (ret == -1) {
if (errno != ENOENT && errno != ELOOP)
gf_log (this->name, GF_LOG_WARNING,
"lstat failed on %s (%s)",
real_path, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_LSTAT_FAILED,
"lstat failed on %s",
real_path);
} else {
// may be some backend filesystem issue
gf_log (this->name, GF_LOG_ERROR, "lstat failed on "
"%s and return value is %d instead of -1. "
"Please see dmesg output to check whether the "
"failure is due to backend filesystem issue",
real_path, ret);
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_LSTAT_FAILED,
"lstat failed on %s and return value is %d "
"instead of -1. Please see dmesg output to "
"check whether the failure is due to backend "
"filesystem issue", real_path, ret);
ret = -1;
}
goto out;
@ -590,16 +611,17 @@ posix_pstat (xlator_t *this, uuid_t gfid, const char *path,
if (ret != 0) {
if (ret == -1) {
if (errno != ENOENT)
gf_log (this->name, GF_LOG_WARNING,
"lstat failed on %s (%s)",
path, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_LSTAT_FAILED,
"lstat failed on %s",
path);
} else {
// may be some backend filesytem issue
gf_log (this->name, GF_LOG_ERROR, "lstat failed on "
"%s and return value is %d instead of -1. "
"Please see dmesg output to check whether the "
"failure is due to backend filesystem issue",
path, ret);
gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_LSTAT_FAILED,
"lstat failed on %s and return value is %d "
"instead of -1. Please see dmesg output to "
"check whether the failure is due to backend "
"filesystem issue", path, ret);
ret = -1;
}
goto out;
@ -763,7 +785,7 @@ posix_gfid_set (xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req)
ret = dict_get_ptr (xattr_req, "gfid-req", &uuid_req);
if (ret) {
gf_log (this->name, GF_LOG_DEBUG,
gf_msg_debug (this->name, 0,
"failed to get the gfid from dict for %s",
loc->path);
goto out;
@ -771,9 +793,8 @@ posix_gfid_set (xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req)
ret = sys_lsetxattr (path, GFID_XATTR_KEY, uuid_req, 16, XATTR_CREATE);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"setting GFID on %s failed (%s)", path,
strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno, P_MSG_GFID_FAILED,
"setting GFID on %s failed ", path);
goto out;
}
gf_uuid_copy (uuid_curr, uuid_req);
@ -819,19 +840,20 @@ posix_set_file_contents (xlator_t *this, const char *path, char *keyp,
ret = write (file_fd, value->data, value->len);
if (ret == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR,
"write failed while doing setxattr "
"for key %s on path %s: %s",
key, real_path, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_SET_FILE_CONTENTS, "write failed"
"while doing setxattr for key %s on"
"path%s", key, real_path);
goto out;
}
ret = close (file_fd);
if (ret == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR,
"close failed on %s: %s",
real_path, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_SET_FILE_CONTENTS,
"close failed on %s",
real_path);
goto out;
}
}
@ -842,29 +864,28 @@ posix_set_file_contents (xlator_t *this, const char *path, char *keyp,
if (file_fd == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR,
"failed to open file %s with O_CREAT: %s",
key, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_SET_FILE_CONTENTS, "failed to open file"
"%s with O_CREAT", key);
goto out;
}
ret = write (file_fd, value->data, value->len);
if (ret == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR,
"write failed on %s while setxattr with "
"key %s: %s",
real_path, key, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_SET_FILE_CONTENTS, "write failed on %s"
"while setxattr with key %s", real_path, key);
goto out;
}
ret = close (file_fd);
if (ret == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR,
"close failed on %s while setxattr with "
"key %s: %s",
real_path, key, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_SET_FILE_CONTENTS, "close failed on"
" %s while setxattr with key %s",
real_path, key);
goto out;
}
}
@ -888,7 +909,8 @@ posix_get_file_contents (xlator_t *this, uuid_t pargfid,
MAKE_HANDLE_PATH (real_path, this, pargfid, name);
if (!real_path) {
op_ret = -ESTALE;
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, ESTALE,
P_MSG_XDATA_GETXATTR,
"Failed to create handle path for %s/%s",
uuid_utoa (pargfid), name);
goto out;
@ -897,8 +919,8 @@ posix_get_file_contents (xlator_t *this, uuid_t pargfid,
op_ret = posix_istat (this, pargfid, name, &stbuf);
if (op_ret == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR, "lstat failed on %s: %s",
real_path, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_XDATA_GETXATTR,
"lstat failed on %s", real_path);
goto out;
}
@ -906,8 +928,8 @@ posix_get_file_contents (xlator_t *this, uuid_t pargfid,
if (file_fd == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR, "open failed on %s: %s",
real_path, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_XDATA_GETXATTR,
"open failed on %s", real_path);
goto out;
}
@ -921,8 +943,8 @@ posix_get_file_contents (xlator_t *this, uuid_t pargfid,
ret = read (file_fd, *contents, stbuf.ia_size);
if (ret <= 0) {
op_ret = -1;
gf_log (this->name, GF_LOG_ERROR, "read on %s failed: %s",
real_path, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_XDATA_GETXATTR,
"read on %s failed", real_path);
goto out;
}
@ -932,8 +954,8 @@ posix_get_file_contents (xlator_t *this, uuid_t pargfid,
file_fd = -1;
if (op_ret == -1) {
op_ret = -errno;
gf_log (this->name, GF_LOG_ERROR, "close on %s failed: %s",
real_path, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_XDATA_GETXATTR,
"close on %s failed", real_path);
goto out;
}
@ -1034,7 +1056,7 @@ void posix_dump_buffer (xlator_t *this, const char *real_path, const char *key,
for (index = 0; index < value->len; index++)
sprintf(buffer+3*index, " %02x", data[index]);
}
gf_log (this->name, GF_LOG_DEBUG,
gf_msg_debug (this->name, 0,
"Dump %s: key:%s flags: %u length:%u data:%s ",
real_path, key, flags, value->len,
(log_level == GF_LOG_TRACE ? buffer : "<skipped in DEBUG>"));
@ -1067,24 +1089,33 @@ posix_handle_pair (xlator_t *this, const char *real_path,
if (errno == ENOENT) {
if (!posix_special_xattr (marker_xattrs,
key)) {
gf_log (this->name, GF_LOG_ERROR,
"setxattr on %s failed: %s",
real_path, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_XATTR_FAILED,
"setxattr on %s failed",
real_path);
}
} else {
#ifdef GF_DARWIN_HOST_OS
gf_log (this->name,
((errno == EINVAL) ?
GF_LOG_DEBUG : GF_LOG_ERROR),
"%s: key:%s flags: %u length:%d error:%s",
real_path, key, flags, value->len,
strerror (errno));
if (errno == EINVAL) {
gf_msg_debug (this->name, 0, "%s: key:"
"%s flags: %u length:%d "
"error:%s", real_path,
key, flags, value->len,
strerror (errno));
} else {
gf_msg (this->name, GF_LOG_ERROR,
errno, P_MSG_XATTR_FAILED,
"%s: key:%s flags: "
"%u length:%d",
real_path, key, flags,
value->len);
#else /* ! DARWIN */
gf_log (this->name, GF_LOG_ERROR,
"%s: key:%s flags: %u length:%d error:%s",
real_path, key, flags, value->len,
strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_XATTR_FAILED, "%s: key:%s"
"flags: %u length:%d", real_path,
key, flags, value->len);
#endif /* DARWIN */
}
@ -1113,21 +1144,26 @@ posix_fhandle_pair (xlator_t *this, int fd,
if (sys_ret < 0) {
ret = -errno;
if (errno == ENOENT) {
gf_log (this->name, GF_LOG_ERROR,
"fsetxattr on fd=%d failed: %s", fd,
strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_XATTR_FAILED, "fsetxattr on fd=%d"
" failed", fd);
} else {
#ifdef GF_DARWIN_HOST_OS
gf_log (this->name,
((errno == EINVAL) ?
GF_LOG_DEBUG : GF_LOG_ERROR),
"fd=%d: key:%s error:%s",
fd, key, strerror (errno));
if (errno == EINVAL) {
gf_msg_debug (this->name, 0, "fd=%d: key:%s "
"error:%s", fd, key,
strerror (errno));
} else {
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_XATTR_FAILED, "fd=%d: key:%s",
fd, key);
}
#else /* ! DARWIN */
gf_log (this->name, GF_LOG_ERROR,
"fd=%d: key:%s error:%s",
fd, key, strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_XATTR_FAILED, "fd=%d: key:%s",
fd, key);
#endif /* DARWIN */
}
@ -1154,14 +1190,14 @@ del_stale_dir_handle (xlator_t *this, uuid_t gfid)
/* check that it is valid directory handle */
size = sys_lstat (hpath, &stbuf);
if (size < 0) {
gf_log (this->name, GF_LOG_DEBUG, "%s: Handle stat failed: "
gf_msg_debug (this->name, 0, "%s: Handle stat failed: "
"%s", hpath, strerror (errno));
goto out;
}
iatt_from_stat (&iabuf, &stbuf);
if (iabuf.ia_nlink != 1 || !IA_ISLNK (iabuf.ia_type)) {
gf_log (this->name, GF_LOG_DEBUG, "%s: Handle nlink %d %d",
gf_msg_debug (this->name, 0, "%s: Handle nlink %d %d",
hpath, iabuf.ia_nlink, IA_ISLNK (iabuf.ia_type));
goto out;
}
@ -1169,7 +1205,7 @@ del_stale_dir_handle (xlator_t *this, uuid_t gfid)
size = posix_handle_path (this, gfid, NULL, newpath, sizeof (newpath));
if (size <= 0) {
if (errno == ENOENT) {
gf_log (this->name, GF_LOG_DEBUG, "%s: %s", newpath,
gf_msg_debug (this->name, 0, "%s: %s", newpath,
strerror (ENOENT));
stale = _gf_true;
}
@ -1178,12 +1214,12 @@ del_stale_dir_handle (xlator_t *this, uuid_t gfid)
size = sys_lgetxattr (newpath, GFID_XATTR_KEY, gfid_curr, 16);
if (size < 0 && errno == ENOENT) {
gf_log (this->name, GF_LOG_DEBUG, "%s: %s", newpath,
gf_msg_debug (this->name, 0, "%s: %s", newpath,
strerror (ENOENT));
stale = _gf_true;
} else if (size == 16 && gf_uuid_compare (gfid, gfid_curr)) {
gf_log (this->name, GF_LOG_DEBUG, "%s: mismatching gfid: %s, "
"at %s", hpath, uuid_utoa (gfid_curr), newpath);
gf_msg_debug (this->name, 0, "%s: mismatching gfid: %s, "
"at %s", hpath, uuid_utoa (gfid_curr), newpath);
stale = _gf_true;
}
@ -1191,11 +1227,11 @@ out:
if (stale) {
size = sys_unlink (hpath);
if (size < 0 && errno != ENOENT)
gf_log (this->name, GF_LOG_ERROR, "%s: Failed to "
"remove handle to %s (%s)", hpath, newpath,
strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_STALE_HANDLE_REMOVE_FAILED, "%s: Failed"
"to remove handle to %s", hpath, newpath);
} else if (size == 16) {
gf_log (this->name, GF_LOG_DEBUG, "%s: Fresh handle for "
gf_msg_debug (this->name, 0, "%s: Fresh handle for "
"%s with gfid %s", hpath, newpath,
uuid_utoa (gfid_curr));
}
@ -1218,7 +1254,7 @@ janitor_walker (const char *fpath, const struct stat *sb,
case S_IFCHR:
case S_IFIFO:
case S_IFSOCK:
gf_log (THIS->name, GF_LOG_TRACE,
gf_msg_trace (THIS->name, 0,
"unlinking %s", fpath);
unlink (fpath);
if (stbuf.ia_nlink == 1)
@ -1227,7 +1263,7 @@ janitor_walker (const char *fpath, const struct stat *sb,
case S_IFDIR:
if (ftwbuf->level) { /* don't remove top level dir */
gf_log (THIS->name, GF_LOG_TRACE,
gf_msg_debug (THIS->name, 0,
"removing directory %s", fpath);
rmdir (fpath);
@ -1292,8 +1328,9 @@ posix_janitor_thread_proc (void *data)
while (1) {
time (&now);
if ((now - priv->last_landfill_check) > priv->janitor_sleep_duration) {
gf_log (this->name, GF_LOG_TRACE,
"janitor cleaning out %s", priv->trash_path);
gf_msg_trace (this->name, 0,
"janitor cleaning out %s",
priv->trash_path);
nftw (priv->trash_path,
janitor_walker,
@ -1306,12 +1343,12 @@ posix_janitor_thread_proc (void *data)
pfd = janitor_get_next_fd (this);
if (pfd) {
if (pfd->dir == NULL) {
gf_log (this->name, GF_LOG_TRACE,
gf_msg_trace (this->name, 0,
"janitor: closing file fd=%d", pfd->fd);
close (pfd->fd);
} else {
gf_log (this->name, GF_LOG_TRACE,
"janitor: closing dir fd=%p", pfd->dir);
gf_msg_debug (this->name, 0, "janitor: closing"
" dir fd=%p", pfd->dir);
closedir (pfd->dir);
}
@ -1338,9 +1375,9 @@ posix_spawn_janitor_thread (xlator_t *this)
posix_janitor_thread_proc, this);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
"spawning janitor thread failed: %s",
strerror (errno));
gf_msg (this->name, GF_LOG_ERROR, errno,
P_MSG_THREAD_FAILED, "spawning janitor "
"thread failed");
goto unlock;
}
@ -1532,7 +1569,8 @@ __posix_fd_ctx_get (fd_t *fd, xlator_t *this, struct posix_fd **pfd_p)
MAKE_HANDLE_PATH (real_path, this, fd->inode->gfid, NULL);
if (!real_path) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, 0,
P_MSG_HANDLE_PATH_CREATE_FAILED,
"Failed to create handle path (%s)",
uuid_utoa (fd->inode->gfid));
ret = -1;
@ -1628,16 +1666,16 @@ posix_fs_health_check (xlator_t *this)
fd = open (file_path, O_CREAT|O_RDWR, 0644);
if (fd == -1) {
gf_log (this->name, GF_LOG_WARNING,
"open() on %s returned: %s", file_path,
strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HEALTHCHECK_FAILED,
"open() on %s returned", file_path);
goto out;
}
nofbytes = write (fd, timestamp, timelen);
if (nofbytes != timelen) {
gf_log (this->name, GF_LOG_WARNING,
"write() on %s returned: %s", file_path,
strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HEALTHCHECK_FAILED,
"write() on %s returned", file_path);
goto out;
}
/* Seek the offset to the beginning of the file, so that the offset for
@ -1645,9 +1683,9 @@ posix_fs_health_check (xlator_t *this)
lseek(fd, 0, SEEK_SET);
nofbytes = read (fd, buff, timelen);
if (nofbytes == -1) {
gf_log (this->name, GF_LOG_WARNING,
"read() on %s returned: %s", file_path,
strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HEALTHCHECK_FAILED,
"read() on %s returned", file_path);
goto out;
}
ret = 0;
@ -1675,7 +1713,7 @@ posix_health_check_thread_proc (void *data)
if (interval == 0)
goto out;
gf_log (this->name, GF_LOG_DEBUG, "health-check thread started, "
gf_msg_debug (this->name, 0, "health-check thread started, "
"interval = %d seconds", interval);
while (1) {
@ -1692,9 +1730,10 @@ posix_health_check_thread_proc (void *data)
ret = posix_fs_health_check (this);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
"health_check on %s returned: %s",
priv->base_path, strerror (errno));
gf_msg (this->name, GF_LOG_WARNING, errno,
P_MSG_HEALTHCHECK_FAILED,
"health_check on %s returned",
priv->base_path);
goto abort;
}
@ -1702,7 +1741,7 @@ posix_health_check_thread_proc (void *data)
}
out:
gf_log (this->name, GF_LOG_DEBUG, "health-check thread exiting");
gf_msg_debug (this->name, 0, "health-check thread exiting");
LOCK (&priv->lock);
{
@ -1714,18 +1753,21 @@ out:
abort:
/* health-check failed */
gf_log (this->name, GF_LOG_EMERG, "health-check failed, going down");
gf_msg (this->name, GF_LOG_EMERG, 0, P_MSG_HEALTHCHECK_FAILED,
"health-check failed, going down");
xlator_notify (this->parents->xlator, GF_EVENT_CHILD_DOWN, this);
ret = sleep (30);
if (ret == 0) {
gf_log (this->name, GF_LOG_EMERG, "still alive! -> SIGTERM");
gf_msg (this->name, GF_LOG_EMERG, 0, P_MSG_HEALTHCHECK_FAILED,
"still alive! -> SIGTERM");
kill (getpid(), SIGTERM);
}
ret = sleep (30);
if (ret == 0) {
gf_log (this->name, GF_LOG_EMERG, "still alive! -> SIGKILL");
gf_msg (this->name, GF_LOG_EMERG, 0, P_MSG_HEALTHCHECK_FAILED,
"still alive! -> SIGKILL");
kill (getpid(), SIGKILL);
}
@ -1757,9 +1799,9 @@ posix_spawn_health_check_thread (xlator_t *xl)
if (ret < 0) {
priv->health_check_interval = 0;
priv->health_check_active = _gf_false;
gf_log (xl->name, GF_LOG_ERROR,
"unable to setup health-check thread: %s",
strerror (errno));
gf_msg (xl->name, GF_LOG_ERROR, errno,
P_MSG_HEALTHCHECK_FAILED,
"unable to setup health-check thread");
goto unlock;
}
@ -1805,7 +1847,8 @@ posix_fsyncer_process (xlator_t *this, call_stub_t *stub, gf_boolean_t do_fsync)
ret = posix_fd_ctx_get (stub->args.fd, this, &pfd);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, EINVAL,
P_MSG_GET_FDCTX_FAILED,
"could not get fdctx for fd(%s)",
uuid_utoa (stub->args.fd->inode->gfid));
call_unwind_error (stub, -1, EINVAL);
@ -1822,7 +1865,7 @@ posix_fsyncer_process (xlator_t *this, call_stub_t *stub, gf_boolean_t do_fsync)
}
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_FSTAT_FAILED,
"could not fstat fd(%s)",
uuid_utoa (stub->args.fd->inode->gfid));
call_unwind_error (stub, -1, errno);
@ -1882,7 +1925,7 @@ posix_fsyncer (void *d)
usleep (priv->batch_fsync_delay_usec);
gf_log (this->name, GF_LOG_DEBUG,
gf_msg_debug (this->name, 0,
"picked %d fsyncs", count);
switch (priv->batch_fsync_mode) {

View File

@ -0,0 +1,899 @@
/*
Copyright (c) 2014 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3 or
later), or the GNU General Public License, version 2 (GPLv2), in all
cases as published by the Free Software Foundation.
*/
#ifndef _POSIX_MESSAGES_H_
#define _POSIX_MESSAGES_H_
#ifndef _CONFIG_H
#define _CONFIG_H
#include "config.h"
#endif
#include "glfs-message-id.h"
/*! \file posix-messages.h
* \brief Psix log-message IDs and their descriptions
*/
/* NOTE: Rules for message additions
* 1) Each instance of a message is _better_ left with a unique message ID, even
* if the message format is the same. Reasoning is that, if the message
* format needs to change in one instance, the other instances are not
* impacted or the new change does not change the ID of the instance being
* modified.
* 2) Addition of a message,
* - Should increment the GLFS_NUM_MESSAGES
* - Append to the list of messages defined, towards the end
* - Retain macro naming as glfs_msg_X (for redability across developers)
* NOTE: Rules for message format modifications
* 3) Check acorss the code if the message ID macro in question is reused
* anywhere. If reused then then the modifications should ensure correctness
* everywhere, or needs a new message ID as (1) above was not adhered to. If
* not used anywhere, proceed with the required modification.
* NOTE: Rules for message deletion
* 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
* anywhere, then can be deleted, but will leave a hole by design, as
* addition rules specify modification to the end of the list and not filling
* holes.
*/
#define POSIX_COMP_BASE GLFS_MSGID_COMP_POSIX
#define GLFS_NUM_MESSAGES 104
#define GLFS_MSGID_END (POSIX_COMP_BASE + GLFS_NUM_MESSAGES + 1)
/* Messaged with message IDs */
#define glfs_msg_start_x POSIX_COMP_BASE, "Invalid: Start of messages"
/*------------*/
/*!
* @messageid 106001
* @diagnosis Operation could not be performed because the server quorum was not
* met
* @recommendedaction Ensure that other peer nodes are online and reachable from
* the local peer node
*/
#define P_MSG_XATTR_FAILED (POSIX_COMP_BASE + 1)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_NULL_GFID (POSIX_COMP_BASE + 2)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FCNTL_FAILED (POSIX_COMP_BASE + 3)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_READV_FAILED (POSIX_COMP_BASE + 4)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FSTAT_FAILED (POSIX_COMP_BASE + 5)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_PFD_NULL (POSIX_COMP_BASE + 6)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_INVALID_ARGUMENT (POSIX_COMP_BASE + 7)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_IO_SUBMIT_FAILED (POSIX_COMP_BASE + 8)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_WRITEV_FAILED (POSIX_COMP_BASE + 9)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_IO_GETEVENTS_FAILED (POSIX_COMP_BASE + 10)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_UNKNOWN_OP (POSIX_COMP_BASE + 11)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_AIO_UNAVAILABLE (POSIX_COMP_BASE + 12)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_IO_SETUP_FAILED (POSIX_COMP_BASE + 13)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_ZEROFILL_FAILED (POSIX_COMP_BASE + 14)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_OPENDIR_FAILED (POSIX_COMP_BASE + 15)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_DIRFD_FAILED (POSIX_COMP_BASE + 16)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FD_PATH_SETTING_FAILED (POSIX_COMP_BASE + 17)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_LSTAT_FAILED (POSIX_COMP_BASE + 18)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_READYLINK_FAILED (POSIX_COMP_BASE + 19)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_GFID_FAILED (POSIX_COMP_BASE + 20)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_CREATE_FAILED (POSIX_COMP_BASE + 21)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_MKNOD_FAILED (POSIX_COMP_BASE + 22)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_LCHOWN_FAILED (POSIX_COMP_BASE + 23)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_ACL_FAILED (POSIX_COMP_BASE + 24)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_MKDIR_NOT_PERMITTED (POSIX_COMP_BASE + 25)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_DIR_OF_SAME_ID (POSIX_COMP_BASE + 26)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_MKDIR_FAILED (POSIX_COMP_BASE + 27)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_CHOWN_FAILED (POSIX_COMP_BASE + 28)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_UNLINK_FAILED (POSIX_COMP_BASE + 29)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_KEY_STATUS_INFO (POSIX_COMP_BASE + 30)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_XATTR_STATUS (POSIX_COMP_BASE + 31)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_RMDIR_NOT_PERMITTED (POSIX_COMP_BASE + 32)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_RMDIR_FAILED (POSIX_COMP_BASE + 33)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_DIR_OPERATION_FAILED (POSIX_COMP_BASE + 34)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_SYMLINK_FAILED (POSIX_COMP_BASE + 35)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_DIR_FOUND (POSIX_COMP_BASE + 36)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_LINK_FAILED (POSIX_COMP_BASE + 37)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_TRUNCATE_FAILED (POSIX_COMP_BASE + 38)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FILE_OP_FAILED (POSIX_COMP_BASE + 39)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_READ_FAILED (POSIX_COMP_BASE + 40)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_DICT_SET_FAILED (POSIX_COMP_BASE + 41)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_STATVFS_FAILED (POSIX_COMP_BASE + 42)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_DIR_NOT_NULL (POSIX_COMP_BASE + 43)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FSYNC_FAILED (POSIX_COMP_BASE + 44)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_CLOSE_FAILED (POSIX_COMP_BASE + 45)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_GETTING_FILENAME_FAILED (POSIX_COMP_BASE + 46)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_INODE_PATH_GET_FAILED (POSIX_COMP_BASE + 47)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_GET_KEY_VALUE_FAILED (POSIX_COMP_BASE + 48)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_CHMOD_FAILED (POSIX_COMP_BASE + 49)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FCHMOD_FAILED (POSIX_COMP_BASE + 50)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FCHOWN_FAILED (POSIX_COMP_BASE + 51)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_UTIMES_FAILED (POSIX_COMP_BASE + 52)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FUTIMES_FAILED (POSIX_COMP_BASE + 53)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_XATTR_NOT_REMOVED (POSIX_COMP_BASE + 54)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_PFD_GET_FAILED (POSIX_COMP_BASE + 55)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_ACCESS_FAILED (POSIX_COMP_BASE + 56)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_PREAD_FAILED (POSIX_COMP_BASE + 57)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_UUID_NULL (POSIX_COMP_BASE + 58)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_EXPORT_DIR_MISSING (POSIX_COMP_BASE + 59)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_SUBVOLUME_ERROR (POSIX_COMP_BASE + 60)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_VOLUME_DANGLING (POSIX_COMP_BASE + 61)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_INVALID_OPTION (POSIX_COMP_BASE + 62)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_INVALID_VOLUME_ID (POSIX_COMP_BASE + 63)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_VOLUME_ID_ABSENT (POSIX_COMP_BASE + 64)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HOSTNAME_MISSING (POSIX_COMP_BASE + 65)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_SET_ULIMIT_FAILED (POSIX_COMP_BASE + 66)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_SET_FILE_MAX_FAILED (POSIX_COMP_BASE + 67)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_MAX_FILE_OPEN (POSIX_COMP_BASE + 68)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_OPEN_FAILED (POSIX_COMP_BASE + 69)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_LOOKUP_NOT_PERMITTED (POSIX_COMP_BASE + 70)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_RENAME_FAILED (POSIX_COMP_BASE + 71)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_WRITE_FAILED (POSIX_COMP_BASE + 72)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FILE_FAILED (POSIX_COMP_BASE + 73)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_THREAD_FAILED (POSIX_COMP_BASE + 74)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HEALTHCHECK_FAILED (POSIX_COMP_BASE + 75)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_GET_FDCTX_FAILED (POSIX_COMP_BASE + 76)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HANDLEPATH_FAILED (POSIX_COMP_BASE + 77)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_IPC_NOT_HANDLE (POSIX_COMP_BASE + 78)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_SET_XDATA_FAIL (POSIX_COMP_BASE + 79)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_DURABILITY_REQ_NOT_SATISFIED (POSIX_COMP_BASE + 80)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_XATTR_NOTSUP (POSIX_COMP_BASE + 81)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_GFID_SET_FAILED (POSIX_COMP_BASE + 82)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_ACL_NOTSUP (POSIX_COMP_BASE + 83)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_BASEPATH_CHDIR_FAILED (POSIX_COMP_BASE + 84)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_INVALID_OPTION_VAL (POSIX_COMP_BASE + 85)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_INVALID_NODE_UUID (POSIX_COMP_BASE + 86)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_FSYNCER_THREAD_CREATE_FAILED (POSIX_COMP_BASE + 87)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_GF_DIRENT_CREATE_FAILED (POSIX_COMP_BASE + 88)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_VOLUME_ID_FETCH_FAILED (POSIX_COMP_BASE + 89)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_UNKNOWN_ARGUMENT (POSIX_COMP_BASE + 90)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_INODE_HANDLE_CREATE (POSIX_COMP_BASE + 91)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_ENTRY_HANDLE_CREATE (POSIX_COMP_BASE + 92)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_PGFID_OP (POSIX_COMP_BASE + 93)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_POSIX_AIO (POSIX_COMP_BASE + 94)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HANDLE_CREATE_TRASH (POSIX_COMP_BASE + 95)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HANDLE_CREATE (POSIX_COMP_BASE + 96)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HANDLE_PATH_CREATE (POSIX_COMP_BASE + 97)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_SET_FILE_CONTENTS (POSIX_COMP_BASE + 98)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_XDATA_GETXATTR (POSIX_COMP_BASE + 99)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_STALE_HANDLE_REMOVE_FAILED (POSIX_COMP_BASE + 100)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HANDLE_PATH_CREATE_FAILED (POSIX_COMP_BASE + 101)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HANDLE_TRASH_CREATE (POSIX_COMP_BASE + 102)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_HANDLE_DELETE (POSIX_COMP_BASE + 103)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
#define P_MSG_READLINK_FAILED (POSIX_COMP_BASE + 104)
/*!
* @messageid
* @diagnosis
* @recommendedaction
*
*/
/*------------*/
#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
#endif /* !_GLUSTERD_MESSAGES_H_ */

File diff suppressed because it is too large Load Diff