Small optimization patch in nfs4_acls.c to avoid refetching stat if we have it

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Small optimization patch in nfs4_acls.c to avoid refetching stat if we have it

Samba - samba-technical mailing list
Hi folks,

This can reduce the number of stat calls we make ...

--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)

0001-Don-t-refetch-stat-info-if-we-already-have-valid-sta.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Small optimization patch in nfs4_acls.c to avoid refetching stat if we have it

Samba - samba-technical mailing list
Hi Richard,

On Thu, Aug 03, 2017 at 08:32:47AM -0700, Richard Sharpe via samba-technical wrote:
> This can reduce the number of stat calls we make ...

is this really correct?

Iirc and from briefly rechecking the code, the callers already do this
check. Also smbacl4_GetFileOwner() looks like it's supposed to return stat info
via the out arg psbuf, so if the statinfo of the smb_fname is valid, you should
probably set *psbuf to smb_fname->st...

-slow

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Small optimization patch in nfs4_acls.c to avoid refetching stat if we have it

Samba - samba-technical mailing list
On Thu, Aug 3, 2017 at 9:07 AM, Ralph Böhme <[hidden email]> wrote:

> Hi Richard,
>
> On Thu, Aug 03, 2017 at 08:32:47AM -0700, Richard Sharpe via samba-technical wrote:
>> This can reduce the number of stat calls we make ...
>
> is this really correct?
>
> Iirc and from briefly rechecking the code, the callers already do this
> check. Also smbacl4_GetFileOwner() looks like it's supposed to return stat info
> via the out arg psbuf, so if the statinfo of the smb_fname is valid, you should
> probably set *psbuf to smb_fname->st...

Oops, EPREMATUREPATCH.

Indeed, there needs to be an else clause that copies smb_fname->st to
*psbuf ... will send a new patch soonish.

--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)

Loading...