[SMB3][PATCH] Speed up open by skipping query FILE_INTERNAL_INFORMATION

Pavel Shilovsky pavel.shilovsky at gmail.com
Thu Jul 18 19:16:35 UTC 2019


This is good improvement at almost no cost! We should definitely get
this functionality in!

Best regards,
Pavel Shilovskiy

чт, 18 июл. 2019 г. в 11:46, Steve French <smfrench at gmail.com>:
>
> Also fyi - did some experiments today.  Perf across the open vfs entry
> point averaged about 20% better with the patch
>
> On Thu, Jul 18, 2019 at 12:37 PM Pavel Shilovsky
> <pavel.shilovsky at gmail.com> wrote:
> >
> > index 54bffb2a1786..e6a1fc72018f 100644
> > --- a/fs/cifs/smb2file.c
> > +++ b/fs/cifs/smb2file.c
> > @@ -88,14 +88,20 @@ smb2_open_file(const unsigned int xid, struct
> > cifs_open_parms *oparms,
> >   }
> >
> >   if (buf) {
> > - /* open response does not have IndexNumber field - get it */
> > - rc = SMB2_get_srv_num(xid, oparms->tcon, fid->persistent_fid,
> > + /* if open response does not have IndexNumber field - get it */
> > + if (smb2_data->IndexNumber == 0) {
> >
> > What's about a server returning 0 for the IndexNumber?
> >
> > - if (rsp->OplockLevel == SMB2_OPLOCK_LEVEL_LEASE)
> > - *oplock = smb2_parse_lease_state(server, rsp,
> > - &oparms->fid->epoch,
> > - oparms->fid->lease_key);
> > - else
> > +
> > + *oplock = smb2_parse_contexts(server, rsp, &oparms->fid->epoch,
> > +       oparms->fid->lease_key,
> > +       buf);
> > + if (*oplock == 0) /* no lease open context found */
> >   *oplock = rsp->OplockLevel;
> >
> > oplock being 0 here probably means that the lease state which is
> > granted is NONE. You still need to keep if (rsp->OplockLevel ==
> > SMB2_OPLOCK_LEVEL_LEASE) gate.
> >
> >  /* See MS-SMB2 2.2.14.2.9 */
> >  struct on_disk_id {
> >
> > Please prefix the structure name with "create_".
> >
> > Best regards,
> > Pavel Shilovskiy
> >
> > чт, 18 июл. 2019 г. в 00:43, Steve French via samba-technical
> > <samba-technical at lists.samba.org>:
> > >
> > > Now that we have the qfid context returned on open we can cut 1/3 of
> > > the traffic on open by not sending the query FILE_INTERNAL_INFORMATION
> > >
> > >
> > >
> > > --
> > > Thanks,
> > >
> > > Steve
>
>
>
> --
> Thanks,
>
> Steve



More information about the samba-technical mailing list