[PATCHES] fix flapping offline flag in gpfs module
obnox at samba.org
Thu Jul 10 16:22:35 MDT 2014
On 2014-07-10 at 10:46 -0700, Christof Schmitt wrote:
> On Thu, Jul 10, 2014 at 10:54:30AM +0200, Volker Lendecke wrote:
> > On Thu, Jul 10, 2014 at 12:38:43AM +0200, Michael Adam wrote:
> > > There is this awful problem of the flapping offline flag
> > > when using the gpfs module and "gpfs:winattr = yes".
> > > It was pretty clear since a time that this must be due
> > > to uninitialized data (where the winattrs are stored),
> > > i.e. the vfs_private in the struct stat_ex.
> > As discussed offline with Michael: I think with patch 2/4
> > vfs_private is not referenced at all anymore. vfs_private is
> > a broken concept once more than one VFS module starts using
> > it. IMHO it should go.
> Other parts of the vfs_gpfs module still access the vfs_private.
Right, but I think that most of these accesses are potentially
invalid, except for the ones setting it: They all check for
(or reset) the offline flag. Hence they all may suffer from
the same problem as the one in is_offline: They may not operate
on properly intialized data. Some don't even check for
They should probably use SMB_VFS_IS_OFFLINE() (and
And then vfs_private could easily be removed.
Thinking about it: these uses of the offline check
are more or less exactly the same as in the tsmsm module.
(Methods: aio_force, sendfile, pread, preade_recv, pwrite,
pwrite_recv, only the open meth is additional in gpfs).
All this is generic treatment of a hsm system.
There seems to be nothing special in this, nor in
tsmsm. So, wouldn't it be a good improvement to
extract this logic from vfs_gpfs and vfs_tsmsm
to a new module, say vfs_hsm. Then only the detection
(and setting) of offline files would remain specific
to vfs_gpfs and others.
Does this sound like a plan?
> I agree that it should go, we just have to replace it with a FSP_EXTENSION.
Yeah maybe in a next step, but not required for removal of
Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: Digital signature
More information about the samba-technical