SMB_VFS_GET_DOS_ATTRIBUTES vs SMB_VFS_IS_OFFLINE

Ralph Böhme slow at samba.org
Sun Sep 11 17:39:26 UTC 2016


On Sun, Sep 11, 2016 at 07:52:03PM +0300, Alexander Bokovoy wrote:
> On Sun, 11 Sep 2016, Ralph Böhme wrote:
> > Now that we have a full fledged SMB_VFS_{GET|SET}_DOS_ATTRIBUTES() I
> > was wondering whether it would be doable to merge SMB_VFS_IS_OFFLINE()
> > into SMB_VFS_GET_DOS_ATTRIBUTES()?
> > 
> > Merging both functions would have the benefit that in VFS modules that
> > use same backing store bits for both, like gpfs, we would avoid
> > calling the backing store twice in dos_mode().
> > 
> > I don't see a reason why SMB_VFS_{GET|SET}_DOS_ATTRIBUTES() couldn't
> > handle FILE_ATTRIBUTE_OFFLINE as well. WIP patch attached, passed a
> > private autobuild.
> > 
> > Thoughts?
>
> It breaks ABI for VFS modules so an increase of VFS API number is
> required.

sure, WIP in the commit message and no sign-off where meant to flag
this as "of course some things are missing". :)

> Alternatively, don't delete offline functions and make calls
> to them from get/set functions in case they were set in the module. The
> latter would allow to keep ABI intact and recommend to avoid
> implementing offline functions in future.

the more I think about it, the more I like this approach. The core
change would be to just allow SMB_VFS_GET_DOS_ATTRIBUTES() to return
FILE_ATTRIBUTE_OFFLINE. VFS modules that support this would then
simply skip an implementation of SMB_VFS_IS_OFFLINE. Hm....

Cheerio!
-slow



More information about the samba-technical mailing list