From 038d8f994d66eeb79734c03ecd631a12d5433221 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 11 Jul 2017 18:58:04 +0530 Subject: libglusterfs: Handle FS errors gracefully Problem: FS sometimes doesn't give the expected return values. We need our common functions to guard against this. Example BUG: https://bugzilla.redhat.com/show_bug.cgi?id=864401 Fix: When the return value is not as per specification, change the return value to -1 and errno to EIO BUG: 1469487 Change-Id: I14739ab2e5ae225b1a91438b87f8928af56f2934 Signed-off-by: Pranith Kumar K --- libglusterfs/src/libglusterfs-messages.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/libglusterfs-messages.h') diff --git a/libglusterfs/src/libglusterfs-messages.h b/libglusterfs/src/libglusterfs-messages.h index dd657013257..f6e63ff990b 100644 --- a/libglusterfs/src/libglusterfs-messages.h +++ b/libglusterfs/src/libglusterfs-messages.h @@ -37,7 +37,7 @@ #define GLFS_LG_BASE GLFS_MSGID_COMP_LIBGLUSTERFS -#define GLFS_LG_NUM_MESSAGES 211 +#define GLFS_LG_NUM_MESSAGES 212 #define GLFS_LG_MSGID_END (GLFS_LG_BASE + GLFS_LG_NUM_MESSAGES + 1) /* Messaged with message IDs */ @@ -1803,6 +1803,15 @@ #define LG_MSG_PTHREAD_NAMING_FAILED (GLFS_LG_BASE + 211) +/*! + * @messageid + * @diagnosis + * @recommendedaction + * + */ + +#define LG_MSG_SYSCALL_RETURNS_WRONG (GLFS_LG_BASE + 212) + /*! * @messageid * @diagnosis -- cgit