Re: [PATCH][SMB3 client] allow deferred close timeout to be configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Will fix the typos thanks.

There are a couple of minor differences from Bharath's earlier patch e.g.

"closetimeo" rather than "dclosetimeo" (I am ok if you prefer the longer name),
and also this mount option is printed in list of mount options if set.


On Thu, Aug 11, 2022 at 11:03 AM Paulo Alcantara <pc@xxxxxx> wrote:
>
> Steve French <smfrench@xxxxxxxxx> writes:
>
> > Deferred close can be a very useful feature for very safely
> > allowing caching data for read, and for minimizing the number
> > of reopens needed for a file that is repeatedly opened and
> > close but there are workloads where its default (1 second,
> > similar to actimeo/acregmax) is too small.
> >
> > Allow the user to configure the amount of time we can
> > defer sending the final smb3 close when we have a
> > handle lease on the file (rather than forcing it to depend
> > on 1 second or actimeo which is often unrelated).
> >
> > Adds new mount parameter "closetime=" which is the maximum
>                             ^^^^^^^^^ should be closetimeo
>
> > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> > index 945fb083cea7..af6114e17fb5 100644
> > --- a/fs/cifs/cifsfs.c
> > +++ b/fs/cifs/cifsfs.c
> > @@ -693,6 +693,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
> >               seq_printf(s, ",acdirmax=%lu", cifs_sb->ctx->acdirmax / HZ);
> >               seq_printf(s, ",acregmax=%lu", cifs_sb->ctx->acregmax / HZ);
> >       }
> > +     if (cifs_sb->ctx->closetimeo != cifs_sb->ctx->acregmax)
> > +             seq_printf(s, ",closetimeo=%lu", cifs_sb->ctx->closetimeo / HZ);
>
> Hrm - I think you can rid of this check.  I'd rather print it out
> unconditionally.
>
> > diff --git a/fs/cifs/fs_context.h b/fs/cifs/fs_context.h
> > index 5f093cb7e9b9..927a5f2f9919 100644
> > --- a/fs/cifs/fs_context.h
> > +++ b/fs/cifs/fs_context.h
> > @@ -125,6 +125,7 @@ enum cifs_param {
> >       Opt_actimeo,
> >       Opt_acdirmax,
> >       Opt_acregmax,
> > +     Opt_closetimeo,
> >       Opt_echo_interval,
> >       Opt_max_credits,
> >       Opt_snapshot,
> > @@ -247,6 +248,8 @@ struct smb3_fs_context {
> >       /* attribute cache timemout for files and directories in jiffies */
> >       unsigned long acregmax;
> >       unsigned long acdirmax;
> > +     /* timeout for deferred close of files in jiffies */
>                                                   ^^^^^^^ seconds
>
> Otherwise, looks good to me.
>
> Reviewed-by: Paulo Alcantara (SUSE) <pc@xxxxxx>



--
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux