[PATCH] Statlite - without VFS changes
Jeremy Allison
jra at samba.org
Fri Dec 19 11:36:43 MST 2014
On Fri, Dec 19, 2014 at 12:43:29PM +0530, Shekhar Amlekar wrote:
> Hi,
>
> Few days back I submitted a stat-lite patch that proposed a
> new samba VFS call and hence needed changes to few
> VFS modules. Here's an attempt to implement the functionality
> without making changes to Samba VFS. The interface is as
> follows-
>
> The statlite mask (in stat structure) is always populated by
> Samba before making a stat call and entering the VFS. For
> normal stat calls, all the bits are set and for partial stats, only
> the select bits are set. Samba also updates the mask, after
> the call.(1)
>
> The opaque VFS modules that support statlite functionality
> (currently vfs_gpfs) read the mask and retrieve requested
> attribs. If all the requested attribs can't be retrieved, an error
> is returned. (2)
>
> Because of (1) and (2), no changes are required to the
> opaque modules that do not support statlite functionality.
> They overwriting the mask field would cause no harm
> (vfs_ceph and vfs_glusterfs zero out the stat structure).
>
> Request your kind review.
Unfortunately the SMB_STRUCT_STAT is implicitly part of the VFS
interface, so this still means a VFS change.
However these patches look really interesting - I like the
cleanups you've done around the boilerplate:
if (posix_paths) {
ret = SMB_VFS_LSTAT(conn, smb_fname);
} else {
ret = SMB_VFS_STAT(conn, smb_fname);
}
code. I'll try and take a closer look soon !
Thanks a *LOT* for this work.
Jeremy.
More information about the samba-technical
mailing list