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