[PATCH] Statlite - without VFS changes
jra at samba.org
Mon Dec 22 15:23:26 MST 2014
On Mon, Dec 22, 2014 at 03:11:31PM +0530, Shekhar Amlekar wrote:
> Hi Jeremy,
> I just updated the patch with a small fix. Request you to take a look at
> this one.
OK, here are some thoughts.
I'm not keen on the STATLITE_SET_EXACT()
and friends MACRO's. It's not easy when
looking at them to understand what they're
I'd prefer something like:
STATLITE_SET_ALL() to set all requested
bits that can be returned.
The other thing that makes me a little
nervous is the fact that using statlite()
the stat structure can have partially
valid values. So we can't just write
code that checks st_ex_VAL anymore
without first checking that (st_ex_slitemask & STATLITE_VAL_BIT)
is set, but I suppose this is something
we'll have to get used to if we're going
to add statlite().
I suppose the fact you've made VALID_STAT
check for STATLITE_EXACT_BITS being set
before reporting a stat struct as valid
will ameliorate this a bit.
I *really* don't like the idiom of
as an in-out parameter to smb_vfs_call_statlite().
I think smb_vfs_call_statlite() should take
a uint32_t mask value that explicitly
shows the statlist bits you are requesting.
If we're going to do this you shouldn't
use vfs_path_get_partial_stat() that always
gets a subset of entries, you need to look
carefully at the code calling statlite
and explicitly make sure you're asking
for the bits that the calling code needs.
I'd appreciate Volker also looking over
this (CC:ed on this reply) to get his
More information about the samba-technical