Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
6a8ea470
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6a8ea470
编写于
8月 04, 2011
作者:
S
Sage Weil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ceph: document ioctls
...after some prodding by Christoph. Signed-off-by:
N
Sage Weil
<
sage@newdream.net
>
上级
0d66a487
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
54 addition
and
1 deletion
+54
-1
fs/ceph/ioctl.h
fs/ceph/ioctl.h
+54
-1
未找到文件。
fs/ceph/ioctl.h
浏览文件 @
6a8ea470
...
...
@@ -6,7 +6,31 @@
#define CEPH_IOCTL_MAGIC 0x97
/* just use u64 to align sanely on all archs */
/*
* CEPH_IOC_GET_LAYOUT - get file layout or dir layout policy
* CEPH_IOC_SET_LAYOUT - set file layout
* CEPH_IOC_SET_LAYOUT_POLICY - set dir layout policy
*
* The file layout specifies how file data is striped over objects in
* the distributed object store, which object pool they belong to (if
* it differs from the default), and an optional 'preferred osd' to
* store them on.
*
* Files get a new layout based on the policy set on the containing
* directory or one of its ancestors. The GET_LAYOUT ioctl will let
* you examine the layout for a file or the policy on a directory.
*
* SET_LAYOUT will let you set a layout on a newly created file. This
* only works immediately after the file is created and before any
* data is written to it.
*
* SET_LAYOUT_POLICY will let you set a layout policy (default layout)
* on a directory that will apply to any new files created in that
* directory (or any child directory that doesn't specify a layout of
* its own).
*/
/* use u64 to align sanely on all archs */
struct
ceph_ioctl_layout
{
__u64
stripe_unit
,
stripe_count
,
object_size
;
__u64
data_pool
;
...
...
@@ -21,6 +45,8 @@ struct ceph_ioctl_layout {
struct ceph_ioctl_layout)
/*
* CEPH_IOC_GET_DATALOC - get location of file data in the cluster
*
* Extract identity, address of the OSD and object storing a given
* file offset.
*/
...
...
@@ -39,7 +65,34 @@ struct ceph_ioctl_dataloc {
#define CEPH_IOC_GET_DATALOC _IOWR(CEPH_IOCTL_MAGIC, 3, \
struct ceph_ioctl_dataloc)
/*
* CEPH_IOC_LAZYIO - relax consistency
*
* Normally Ceph switches to synchronous IO when multiple clients have
* the file open (and or more for write). Reads and writes bypass the
* page cache and go directly to the OSD. Setting this flag on a file
* descriptor will allow buffered IO for this file in cases where the
* application knows it won't interfere with other nodes (or doesn't
* care).
*/
#define CEPH_IOC_LAZYIO _IO(CEPH_IOCTL_MAGIC, 4)
/*
* CEPH_IOC_SYNCIO - force synchronous IO
*
* This ioctl sets a file flag that forces the synchronous IO that
* bypasses the page cache, even if it is not necessary. This is
* essentially the opposite behavior of IOC_LAZYIO. This forces the
* same read/write path as a file opened by multiple clients when one
* or more of those clients is opened for write.
*
* Note that this type of sync IO takes a different path than a file
* opened with O_SYNC/D_SYNC (writes hit the page cache and are
* immediately flushed on page boundaries). It is very similar to
* O_DIRECT (writes bypass the page cache) excep that O_DIRECT writes
* are not copied (user page must remain stable) and O_DIRECT writes
* have alignment restrictions (on the buffer and file offset).
*/
#define CEPH_IOC_SYNCIO _IO(CEPH_IOCTL_MAGIC, 5)
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录