From 31e67507144aae8d5a8ec49587ac89d2d94636f0 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 3 Jul 2014 10:10:11 +0200 Subject: [PATCH] s3:vfs:gpfs: fix flapping offline: always get winAttrs from gpfs for is_offline There is a problem of flapping offline due to uninitialized stat buffers. Due to a optimization in vfswrap_readdir which directly calling fastatat (i.e. not through vfs), marking the stat buffer valid, there is nothing this module can do about it and hence can not currently not rely on the vaildity of the stat buffer. By always calling out to GPFS even when the stat buffer is flagged valid, we can always return correct offline information, thereby sacrificing the readdir optimization. Pair-Programmed-With: Volker Lendecke Signed-off-by: Michael Adam Reviewed-by: Christof Schmitt --- source3/modules/vfs_gpfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index d8d59f95a9c..9fcce78a681 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1819,9 +1819,7 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle, return -1; } - if (VALID_STAT(*sbuf)) { - attrs.winAttrs = sbuf->vfs_private; - } else { + { int ret; ret = get_gpfs_winattrs(path, &attrs); -- 2.11.4.GIT