summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-07-03 10:10:11 +0200
committerChristof Schmitt <cs@samba.org>2014-07-13 08:59:11 +0200
commit31e67507144aae8d5a8ec49587ac89d2d94636f0 (patch)
tree2a14917de579bb502e469a12848e9192ced579f8
parent573ca6ef6b8376800d8fc988d67909e103b74656 (diff)
downloadsamba-31e67507144aae8d5a8ec49587ac89d2d94636f0.tar.gz
samba-31e67507144aae8d5a8ec49587ac89d2d94636f0.tar.xz
samba-31e67507144aae8d5a8ec49587ac89d2d94636f0.zip
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 <vl@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
-rw-r--r--source3/modules/vfs_gpfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index d8d59f95a9..9fcce78a68 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);