linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Wendy Cheng <wcheng@redhat.com>, linux-fsdevel@vger.kernel.org
Subject: Re: File system awareness (or lack thereof) of vfs granting of leases
Date: Thu, 22 Feb 2007 16:57:43 -0600	[thread overview]
Message-ID: <20070222225743.GD19768@redhat.com> (raw)
In-Reply-To: <20070222215828.GE18622@fieldses.org>

On Thu, Feb 22, 2007 at 04:58:28PM -0500, J. Bruce Fields wrote:
> I'm also curious--exposing my total ignorance of the dlm--why taking
> such a lock would always be so expensive, or would always be required on
> open.  Surely the typical case should be one where there's no conflict
> and never has been, in which case asking for the lock you need should be
> a trivial local operation?

Acquiring a dlm lock can require, 0, 1 or 2 remote requests, depending on
the luck of a hash and whether another node has a lock on the same file.
It's usually nonzero and you have to do a remote operation.

You have to do a dlm operation on every open and every close of every file
because you need to have a record of the opened state of the file (and
mode) _in case_ someone tries to do a lease.  If you removed these two
rules (from fcntl man page)

  "A read lease can only be placed on a file descriptor that is opened
   read-only."

  "A write lease may be placed on a file only if no other process
   currently has the file open."

it would become much easier because you could distribute only the current
lease state across all the nodes and every open would just require a local
check.  Assuming there are far fewer leases than opens.

Dave


      reply	other threads:[~2007-02-22 22:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16 23:51 File system awareness (or lack thereof) of vfs granting of leases Robert Rappaport
2007-02-17  5:32 ` Wendy Cheng
2007-02-18  6:39   ` J. Bruce Fields
2007-02-20 15:46     ` Robert Rappaport
2007-02-20 16:33       ` J. Bruce Fields
2007-02-20 19:08         ` Robert Rappaport
2007-02-20 21:14           ` bfields
2007-02-20 21:57             ` Robert Rappaport
2007-02-20 19:08       ` David Teigland
2007-02-20 20:51         ` bfields
2007-02-20 20:55           ` bfields
2007-02-20 21:25           ` David Teigland
2007-02-22 21:58             ` J. Bruce Fields
2007-02-22 22:57               ` David Teigland [this message]

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=20070222225743.GD19768@redhat.com \
    --to=teigland@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=wcheng@redhat.com \
    /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).