[Lustre-discuss] Lustre File Locking not locking

Bernd Schubert bs at q-leap.de
Thu Aug 21 08:13:21 PDT 2008


On Thursday 21 August 2008 13:15:00 Bernd Schubert wrote:
> On Thursday 21 August 2008 12:32:32 Andreas Dilger wrote:
> > On Aug 21, 2008  12:23 +0200, Bernd Schubert wrote:
> > > IHMO, instead of calling LBUG() here, simply "return EINVAL" should be
> > > done. So with the present code it seems whenever the userspace is
> > > setting a wrong struct flock l_type, it will trigger a LBUG(). I'm
> > > going to check this and then will fill in a bugzilla entry.
> >
> > Yes, this is very old code, and it should be fixed.  Ideally it would
> > be fixed to handle this lock type properly, but EINVAL is definitely
> > better than the LBUG.  I believe there is already a bug open for this.
>
> Hmm, but what is type 96? In binary it is "1100000", so maybe an endian
> problem and it should "11"? But then what is "11", if at all corresponds to
> 1 | 2, thus F_WRLCK | F_UNLCK. But does it make sense to set both at once?

Ah, it is probably the flock call and not lockf/fcntl, I always get confused 
by the two different locking methods.

This is bug #5135 (https://bugzilla.lustre.org/show_bug.cgi?id=5135).


Cheers,
Bernd


-- 
Bernd Schubert
Q-Leap Networks GmbH



More information about the lustre-discuss mailing list