[PATCH] s3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()
Christof Schmitt
cs at samba.org
Wed May 14 08:22:42 MDT 2014
>From ea3c066e8383ab85fc7e6ad246c3ea867ee45985 Mon Sep 17 00:00:00 2001
From: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Date: Fri, 31 Jan 2014 10:31:21 +0100
Subject: [PATCH] s3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()
Signed-off-by: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Reviewed-by: Christof Schmitt <cs at samba.org>
---
source3/modules/vfs_gpfs.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index a56af8f..c9d4343 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1448,6 +1448,7 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle, const char *pat
struct gpfs_winattr attrs;
int ret = 0;
struct gpfs_config_data *config;
+ int debug;
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct gpfs_config_data,
@@ -1473,8 +1474,13 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle, const char *pat
size);
}
- DEBUG(1, ("gpfs_get_xattr: Get GPFS attributes failed: "
- "%d (%s)\n", ret, strerror(errno)));
+ if (errno != EPERM && errno != EACCES) {
+ debug = 1;
+ } else {
+ debug = 5;
+ }
+ DEBUG(debug, ("gpfs_get_xattr: Get GPFS attributes failed: "
+ "%d (%s)\n", ret, strerror(errno)));
return -1;
}
--
1.7.1
More information about the samba-technical
mailing list