[PATCH] Statlite - without VFS changes
samlekar at in.ibm.com
Wed Dec 24 02:13:58 MST 2014
A comment below - will wait for more comments from
Jeremy Allison <jra at samba.org> wrote on 12/23/2014 03:53:26 AM:
> From: Jeremy Allison <jra at samba.org>
> To: Shekhar Amlekar/India/IBM at IBMIN
> Cc: Jeremy Allison <jra at samba.org>, samba-technical <samba-
> technical at lists.samba.org>, vl at sernet.de
> Date: 12/23/2014 03:50 AM
> Subject: Re: [PATCH] Statlite - without VFS changes
> 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
> > 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
> using smb_fname->st.st_ex_slitemask
> 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.
Retrieving one of the fields in partial
stat is as expensive as retrieving them all.
So, if the callers use
vfs_path_get_partial_stat(), it doesn't have
to set the mask explicitly.
For the callers, then, we'd have three stat
levels in the increasing order of cost for
the FS -
This is just a thought, I can incorporate
your comment here.
> I'd appreciate Volker also looking over
> this (CC:ed on this reply) to get his
> initial thoughts.
More information about the samba-technical