linux内核文件翻译 田雨 计科1002 1012300206

Chinese translated version of Documentation/SecurityBugs

If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.

---------------------------------------------------------------------


如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。

中文版维护者:田雨
中文版翻译者:田雨
中文版校译者:田雨

 


dlmfs
==================
A minimal DLM userspace interface implemented via a virtual file
system.
通过一个虚拟的文件
系统实现一个最小的DLM用户空间
dlmfs is built with OCFS2 as it requires most of its infrastructure.
DLMFS OCFS2它最需要的基础设施。
Project web page:    http://oss.oracle.com/projects/ocfs2   项目的网页: http://oss.oracle.com/projects/ocfs2
Tools web page:      http://oss.oracle.com/projects/ocfs2-tools 工具网页: http://oss.oracle.com/projects/ocfs2-tools
OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/OCFS2邮件列表:http://oss.oracle.com/projects/ocfs2/mailman/OCFS2

All code copyright 2005 Oracle except when otherwise noted.
2005年预报所有代码的版权除非另有说明
CREDITS
鸣谢
====

Some code taken from ramfs which is Copyright (C) 2000 Linus Torvalds
and Transmeta Corp.
从版权所有(C)2000 Linus Torvalds的ramfs的采取一些代码
和Transmeta公司
Mark Fasheh <mark.fasheh@oracle.com>
标记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.
现在,它仅适用于OCFS2 DLM,虽然支持其他
  DLM实现不应该是一个重大的问题。
Mount options
=安装选项============
None
没有
Usage
=====
用法

If you're just interested in OCFS2, then please see ocfs2.txt. The
rest of this document will be geared towards those who want to use
dlmfs for easy to setup and easy to use clustered locking in
userspace.
如果你只是有兴趣在OCFS2,那么请参阅ocfs2.txt“。该
本文件的其余部分将面向那些想要使用
易于安装和易于使用的集群DLMFS锁定
用户空间。
Setup
=====
体系
dlmfs requires that the OCFS2 cluster infrastructure be in
place. Please download ocfs2-tools from the above url and configure a
cluster.
DLMFS需要使用OCFS2集群基础设施
的地方。请从上述网址下载OCFS2工具和配置
集群。
You'll want to start heartbeating on a volume which all the nodes in
your lockspace can access. The easiest way to do this is via
ocfs2_hb_ctl (distributed with ocfs2-tools). Right now it requires
that an OCFS2 file system be in place so that it can automatically
find its heartbeat area, though it will eventually support heartbeat
against raw disks.
您将要开始心跳的卷上的所有节点
可以访问你lockspace。做到这一点最简单的方法是通过
ocfs2_hb_ctl(分布式与ocfs2的工具)。眼下它需要
OCFS2文件系统在正确的位置以便自动
发现其心跳区域,虽然它最终将支持心跳
反对原料磁盘。
Please see the ocfs2_hb_ctl and mkfs.ocfs2 manual pages distributed
with ocfs2-tools.
请看用ocfs2的工具的ocfs2_hb_ctl和分发文件mkfs.ocfs2手册页

Once you're heartbeating, DLM lock 'domains' can be easily created /
destroyed and locks within them accessed.
一旦你心跳,DLM锁'域'可以很容易地创建/
销毁,锁在他们的访问。
Locking
=======
锁定
Users may access dlmfs via standard file system calls, or they can use
'libo2dlm' (distributed with ocfs2-tools) which abstracts the file
system calls and presents a more traditional locking api.
用户可能通过标准的文件系统调用访问DLMFS,或者他们可以使用
libo2dlm OCFS2工具(分布式)抽象的文件
系统调用,并提出一个更传统的锁定API。
dlmfs handles lock caching automatically for the user, so a lock
request for an already acquired lock will not generate another DLM
call. Userspace programs are assumed to handle their own local
locking.
DLMFS手柄自动为用户锁定缓存,所以锁
请求已经获得的锁,不会产生另一个DLM
调用。假设用户空间程序来处理自己的本地
锁定。
Two levels of locks are supported - Shared Read, and Exclusive.
Also supported is a Trylock operation.
支持两种级别的锁 - 共享阅读和异。
还支持的tryLock操作。
For information on the libo2dlm interface, please see o2dlm.h,
distributed with ocfs2-tools.
信息上libo2dlm接口,请见o2dlm.h,“
分布与OCFS2工具。
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. The
maximum currently supported LVB length is 64 bytes (though that is an
OCFS2 DLM limitation). Through this mechanism, users of dlmfs can share
small amounts of data amongst their nodes.
通过您开放(2)调用,锁值块可以读取和写入资源,通过阅读(2)和
对FD和写入。它
目前最大支持的LVB长度为64字节(虽然这是一个
OCFS2 DLM限制)。通过这个机制,用户可以分享DLMFS
少量的节点之间的数据。
mkdir(2) signals dlmfs to join a domain (which will have the same name
as the resulting directory)
MKDIR(2)的信号DLMFS加入域(作为生成的目录它将具有相同的名称)
rmdir(2) signals dlmfs to leave the domain
rmdir(2)的信号DLMFS到离开域
Locks for a given domain are represented by regular inodes inside the
domain directory.  Locking against them is done via the open(2) system
call.
定期内部的inode锁
域目录是以给定域为代表的。锁定是通过对他们的open(2)系统
调用。
The open(2) call will not return until your lock has been granted or
an error has occurred, unless it has been instructed to do a trylock
operation. If the lock succeeds, you'll get an fd.
开放式(2)调用不会返回,直到你的锁已授出或
错误已经发生,除非它已指示做tryLock
操作。如果锁定成功,你会得到一个FD。
open(2) with O_CREAT to ensure the resource inode is created - dlmfs does
not automatically create inodes for existing lock resources.
开式(2)与O_CREAT确保资源的inode创建 -  DLMFS确实
不能自动创建inode现有的锁资源。
Open Flag     Lock Request Type
-打开标志------锁定请求类型--     -----------------
O_RDONLY      Shared Read共享阅读
O_RDWR        Exclusive独家

Open Flag     Resulting Locking Behavior
-打开标志-----------     --导致锁定行为------------------------
O_NONBLOCK    Trylock operation
              tryLock操作
You must provide exactly one of O_RDONLY or O_RDWR.
你必须提供准确O_RDONLY或O_RDWR之一
If O_NONBLOCK is also provided and the trylock operation was valid but
could not lock the resource then open(2) will return ETXTBUSY.
如果O_NONBLOCK提供的tryLock操作是有效的,但
无法锁定资源,那么打开(2)将返回ETXTBUSY
close(2) drops the lock associated with your fd.
2)密切下降锁与您的FD。

Modes passed to mkdir(2) or open(2) are adhered to locally. Chown is
supported locally as well. This means you can use them to restrict
access to the resources via dlmfs on your local node only.
传递是mkdir(2)或开放式的模式(2)粘附到本地。乔恩同样
支持本地。这意味着你可以通过DLMFS在您的本地节点来限制
访问的资源
The resource LVB may be read from the fd in either Shared Read or
Exclusive modes via the read(2) system call. It can be written via
write(2) only when open in Exclusive mode.
无论是共享的读或通过读(2)系统调用的独家模式读出FD资源LVB
。它通过书面(2)只有当以独占方式打开。

Once written, an LVB will be visible to other nodes who obtain Read
Only or higher level locks on the resource.
一旦写入,LVB将会看到谁获得阅读到其他节点
只有或更高水平的资源锁。
See Also参见
========
http://opendlm.sourceforge.net/cvsmirror/opendlm/docs/dlmbook_final.pdf

For more information on the VMS distributed locking API.
对于VMS分布式锁定API的更多信息

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值