s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.
authorMichael Adam <obnox@samba.org>
Thu, 17 Jul 2014 15:22:09 +0000 (17:22 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 7 Aug 2014 14:43:09 +0000 (16:43 +0200)
commit9093f2d9d40bbfaf0776926a5f911ff3bc7bd522
treef4a6318d45b48b2a0c4d9bd22d856c7228ee6cdf
parent1c8232684a30c1ac1fec1d65b664fc80d2331224
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>
(cherry picked from commit 16a040f8ef7f2f594505ef07e6f9b77df8f1d725)

Conflicts:
source3/modules/vfs_gpfs.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10741
source3/modules/vfs_gpfs.c