Re: File system awareness (or lack thereof) of vfs granting of leases

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

 



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

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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