Re: open sleeps

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

 



On Fri, 20 Jun 2008 10:07:26 +1000 Brian May <brian@xxxxxxxx> wrote:
>
> Stephen Rothwell wrote:
> > So, it would seem some other process has taken write leases on your
> > files but does not release them in a timely manner.  You can see the
> > current leases in /proc/locks.
> >   
> What is a lease? Is this a kernel level thing or user level thing?

Its what samba calls an oplock.  Its like a kernel file lock but it
blocks opens and notifies the holder (who is supposed to clean up and
release the lease).  If the lease is not released in 45 seconds (by
default) then the kernel assumes that the holder is broken and breaks the
lease and allows the open to proceed.

> What is the format of /proc/locks? I assume the 4th field is PID, what 
> is the next field? How do I work out what is locked?

the format is:

index: type status subtype pid major:minor:inode start end

for leases, type is LEASE status is ACTIVE, BREAKING or BREAKER, subtype
is UNLCK, READ or WRITE.

If there is a "->" infromt of the type, then the process described by
this line is blocked by the first line with the same index.

You can see the inode number of a file using "ls -i".

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgpIX00nizbG6.pgp
Description: PGP signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux