⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlmfs.txt

📁 linux 内核源代码
💻 TXT
字号:
dlmfs==================A minimal DLM userspace interface implemented via a virtual filesystem.dlmfs is built with OCFS2 as it requires most of its infrastructure.Project web page:    http://oss.oracle.com/projects/ocfs2Tools web page:      http://oss.oracle.com/projects/ocfs2-toolsOCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/All code copyright 2005 Oracle except when otherwise noted.CREDITS=======Some code taken from ramfs which is Copyright (C) 2000 Linus Torvaldsand Transmeta Corp.Mark Fasheh <mark.fasheh@oracle.com>Caveats=======- Right now it only works with the OCFS2 DLM, though support for other  DLM implementations should not be a major issue.Mount options=============NoneUsage=====If you're just interested in OCFS2, then please see ocfs2.txt. Therest of this document will be geared towards those who want to usedlmfs for easy to setup and easy to use clustered locking inuserspace.Setup=====dlmfs requires that the OCFS2 cluster infrastructure be inplace. Please download ocfs2-tools from the above url and configure acluster.You'll want to start heartbeating on a volume which all the nodes inyour lockspace can access. The easiest way to do this is viaocfs2_hb_ctl (distributed with ocfs2-tools). Right now it requiresthat an OCFS2 file system be in place so that it can automaticallyfind it's heartbeat area, though it will eventually support heartbeatagainst raw disks.Please see the ocfs2_hb_ctl and mkfs.ocfs2 manual pages distributedwith ocfs2-tools.Once you're heartbeating, DLM lock 'domains' can be easily created /destroyed and locks within them accessed.Locking=======Users may access dlmfs via standard file system calls, or they can use'libo2dlm' (distributed with ocfs2-tools) which abstracts the filesystem calls and presents a more traditional locking api.dlmfs handles lock caching automatically for the user, so a lockrequest for an already acquired lock will not generate another DLMcall. Userspace programs are assumed to handle their own locallocking.Two levels of locks are supported - Shared Read, and Exclusive.Also supported is a Trylock operation.For information on the libo2dlm interface, please see o2dlm.h,distributed with ocfs2-tools.Lock value blocks can be read and written to a resource via read(2)and write(2) against the fd obtained via your open(2) call. Themaximum currently supported LVB length is 64 bytes (though that is anOCFS2 DLM limitation). Through this mechanism, users of dlmfs can sharesmall amounts of data amongst their nodes.mkdir(2) signals dlmfs to join a domain (which will have the same nameas the resulting directory)rmdir(2) signals dlmfs to leave the domainLocks for a given domain are represented by regular inodes inside thedomain directory.  Locking against them is done via the open(2) systemcall.The open(2) call will not return until your lock has been granted oran error has occurred, unless it has been instructed to do a trylockoperation. If the lock succeeds, you'll get an fd.open(2) with O_CREAT to ensure the resource inode is created - dlmfs doesnot automatically create inodes for existing lock resources.Open Flag     Lock Request Type---------     -----------------O_RDONLY      Shared ReadO_RDWR        ExclusiveOpen Flag     Resulting Locking Behavior---------     --------------------------O_NONBLOCK    Trylock operationYou must provide exactly one of O_RDONLY or O_RDWR.If O_NONBLOCK is also provided and the trylock operation was valid butcould not lock the resource then open(2) will return ETXTBUSY.close(2) drops the lock associated with your fd.Modes passed to mkdir(2) or open(2) are adhered to locally. Chown issupported locally as well. This means you can use them to restrictaccess to the resources via dlmfs on your local node only.The resource LVB may be read from the fd in either Shared Read orExclusive modes via the read(2) system call. It can be written viawrite(2) only when open in Exclusive mode.Once written, an LVB will be visible to other nodes who obtain ReadOnly or higher level locks on the resource.See Also========http://opendlm.sourceforge.net/cvsmirror/opendlm/docs/dlmbook_final.pdfFor more information on the VMS distributed locking API.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -