s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.
commit16a040f8ef7f2f594505ef07e6f9b77df8f1d725
authorMichael Adam <obnox@samba.org>
Thu, 17 Jul 2014 15:22:09 +0000 (17 17:22 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 24 Jul 2014 09:56:09 +0000 (24 11:56 +0200)
tree1ee45c1e34d8dc911c67e453108387d926387119
parent44e9ab21ddfdf0e82a0ed9a884d411af66408962
s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.

This was used as a cache for offline-info in the stat buffer.
But as the implementation of gpfs_is_offline() showed, this cache
does not always carry valid information when the stat itself is valid
(since at least one call goes to fstatat() directly, circumventing
 the vfs).

So the correct thing is to always call SMB_VFS_IS_OFFLINE()
when checking whether a file is offline. For the pread and pwrite
calls, we need to call IS_OFFLINE before the actual read
and check afterwards if the file was offline before (as a basis
whether to send notifications).

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
source3/modules/vfs_gpfs.c