From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Brian May <brian@vpac.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: open sleeps
Date: Fri, 20 Jun 2008 10:20:03 +1000 [thread overview]
Message-ID: <20080620102003.8dd1270c.sfr@canb.auug.org.au> (raw)
In-Reply-To: <485AF4BE.6090409@vpac.org>
[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]
On Fri, 20 Jun 2008 10:07:26 +1000 Brian May <brian@vpac.org> 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@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-06-20 0:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 23:14 open sleeps Brian May
2008-06-19 23:58 ` Stephen Rothwell
2008-06-20 0:07 ` Brian May
2008-06-20 0:20 ` Stephen Rothwell [this message]
2008-06-20 0:50 ` Brian May
2008-06-20 1:11 ` Brian May
2008-06-20 6:45 ` Dave Chinner
2008-06-26 6:30 ` Brian May
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080620102003.8dd1270c.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=brian@vpac.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).