[PATCH] s3: Avoid oplock break by storing timestamps with gpfs_set_times

Jeremy Allison jra at samba.org
Wed Jan 8 10:01:55 MST 2014


On Wed, Jan 08, 2014 at 09:30:29AM -0700, Christof Schmitt wrote:
> On Tue, Jan 07, 2014 at 05:19:21PM -0800, Jeremy Allison wrote:
> > On Tue, Jan 07, 2014 at 02:58:24PM -0700, Christof Schmitt wrote:
> > > >From 241e2865d11276688427ee3b1adbc0c0eb7d007a Mon Sep 17 00:00:00 2001
> > > From: Christof Schmitt <cs at samba.org>
> > > Date: Tue, 7 Jan 2014 11:55:46 -0700
> > > Subject: [PATCH] s3: Avoid oplock break by storing timestamps with gpfs_set_times
> > > 
> > > The gpfs_set_times API call allows setting timestamps directly in GPFS
> > > without going through the utime() call. Using this API call fixes an
> > > unecessary oplock break when a client sends a SET_FILE_ALLOCATION_INFO
> > > request and no other client has opened the file. The call to utime()
> > > triggers the oplock break through the Linux kernel. Using the
> > > gpfs_set_times call for updating the timestamp avoids the call to
> > > utime() and the oplock break.
> > 
> > > Signed-off-by: Christof Schmitt <cs at samba.org>
> > 
> > LGTM.
> > 
> > Reviewed-by: Jeremy Allison <jra at samba.org>
> 
> Thank you, i will push it to autobuild.
> 
> > One question though - why don't use use gpfs_set_times()
> > by default or just set gpfs:settimes = yes by default ?
> > 
> > I'm not sure why you want it off by default - any
> > particular reason ?
> 
> I am not sure what you referring to. It is enabled by default, see the
> comment in the manpage and the default setting for gpfs:settimes:
> 
> +               <command>yes(default)</command> - Use gpfs_set_times.
> +               Fall back to utime and winattr when it is not available.
> +               </para></listitem>

Doh! Never mind, for some reason when I read the code I
saw it as "off" by default.

Thanks !

Jeremy.


More information about the samba-technical mailing list