1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

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>
This commit is contained in:
Michael Adam 2014-07-03 10:10:11 +02:00 committed by Christof Schmitt
parent 573ca6ef6b
commit 31e6750714

View File

@ -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);