summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/storage/posix/src/posix-messages.h13
-rw-r--r--xlators/storage/posix/src/posix.c4
2 files changed, 15 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix-messages.h b/xlators/storage/posix/src/posix-messages.h
index fbae4d8d83a..7d0ff0282bf 100644
--- a/xlators/storage/posix/src/posix-messages.h
+++ b/xlators/storage/posix/src/posix-messages.h
@@ -45,7 +45,8 @@
*/
#define POSIX_COMP_BASE GLFS_MSGID_COMP_POSIX
-#define GLFS_NUM_MESSAGES 112
+
+#define GLFS_NUM_MESSAGES 113
#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"
@@ -954,7 +955,6 @@
*
*/
-
#define P_MSG_DISK_SPACE_CHECK_FAILED (POSIX_COMP_BASE + 112)
/*!
@@ -964,6 +964,15 @@
*
*/
+#define P_MSG_FALLOCATE_FAILED (POSIX_COMP_BASE + 113)
+
+/*!
+ * @messageid
+ * @diagnosis
+ * @recommendedaction
+ *
+ */
+
/*------------*/
#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 479d5c04b29..91e32fc1201 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -836,6 +836,10 @@ posix_do_fallocate (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = sys_fallocate (pfd->fd, flags, offset, len);
if (ret == -1) {
ret = -errno;
+ gf_msg (this->name, GF_LOG_ERROR, -ret, P_MSG_FALLOCATE_FAILED,
+ "fallocate failed on %s offset: %jd, "
+ "len:%zu, flags: %d", uuid_utoa (fd->inode->gfid),
+ offset, len, flags);
goto out;
}