From 26290ba8a45d4caf935995284a111ec57f77cfd7 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 9 Jul 2014 23:56:34 +0200 Subject: s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offline In is_offline(), check whether the winAttrs are filled with bits outside 0xFFFF and log it prominently: Since GPFS only fills 0xFFFF, this could be due to an uninitialized buffer (or another vfs module filling vfs_private? ...). Signed-off-by: Michael Adam Reviewed-by: Christof Schmitt --- source3/modules/vfs_gpfs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 9fcce78a68..c94e4e829e 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1819,6 +1819,11 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle, return -1; } + if (VALID_STAT(*sbuf) && (sbuf->vfs_private & ~0x0FFFF) != 0) { + DEBUG(0, ("vfs_gpfs_is_offline: valid stat but " + "uninitialized winAttrs (0x%08x)?\n", + (uint32_t)sbuf->vfs_private)); + } { int ret; ret = get_gpfs_winattrs(path, &attrs); -- cgit