Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4cd8f319
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4cd8f319
编写于
7月 25, 2016
作者:
M
Martin Brandenburg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
orangefs: Allow dcache and getattr cache time to be configured.
Signed-off-by:
N
Martin Brandenburg
<
martin@omnibond.com
>
上级
71680c18
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
52 addition
and
7 deletion
+52
-7
fs/orangefs/dcache.c
fs/orangefs/dcache.c
+1
-1
fs/orangefs/namei.c
fs/orangefs/namei.c
+4
-4
fs/orangefs/orangefs-kernel.h
fs/orangefs/orangefs-kernel.h
+2
-0
fs/orangefs/orangefs-mod.c
fs/orangefs/orangefs-mod.c
+2
-0
fs/orangefs/orangefs-sysfs.c
fs/orangefs/orangefs-sysfs.c
+42
-1
fs/orangefs/orangefs-utils.c
fs/orangefs/orangefs-utils.c
+1
-1
未找到文件。
fs/orangefs/dcache.c
浏览文件 @
4cd8f319
...
...
@@ -73,7 +73,7 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
}
}
dentry
->
d_time
=
jiffies
+
HZ
;
dentry
->
d_time
=
jiffies
+
dcache_timeout_msecs
*
HZ
/
1000
;
ret
=
1
;
out_release_op:
op_release
(
new_op
);
...
...
fs/orangefs/namei.c
浏览文件 @
4cd8f319
...
...
@@ -72,7 +72,7 @@ static int orangefs_create(struct inode *dir,
d_instantiate
(
dentry
,
inode
);
unlock_new_inode
(
inode
);
dentry
->
d_time
=
jiffies
+
HZ
;
dentry
->
d_time
=
jiffies
+
dcache_timeout_msecs
*
HZ
/
1000
;
ORANGEFS_I
(
inode
)
->
getattr_time
=
0
;
gossip_debug
(
GOSSIP_NAME_DEBUG
,
...
...
@@ -183,7 +183,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
goto
out
;
}
dentry
->
d_time
=
jiffies
+
HZ
;
dentry
->
d_time
=
jiffies
+
dcache_timeout_msecs
*
HZ
/
1000
;
inode
=
orangefs_iget
(
dir
->
i_sb
,
&
new_op
->
downcall
.
resp
.
lookup
.
refn
);
if
(
IS_ERR
(
inode
))
{
...
...
@@ -322,7 +322,7 @@ static int orangefs_symlink(struct inode *dir,
d_instantiate
(
dentry
,
inode
);
unlock_new_inode
(
inode
);
dentry
->
d_time
=
jiffies
+
HZ
;
dentry
->
d_time
=
jiffies
+
dcache_timeout_msecs
*
HZ
/
1000
;
ORANGEFS_I
(
inode
)
->
getattr_time
=
0
;
gossip_debug
(
GOSSIP_NAME_DEBUG
,
...
...
@@ -386,7 +386,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
d_instantiate
(
dentry
,
inode
);
unlock_new_inode
(
inode
);
dentry
->
d_time
=
jiffies
+
HZ
;
dentry
->
d_time
=
jiffies
+
dcache_timeout_msecs
*
HZ
/
1000
;
ORANGEFS_I
(
inode
)
->
getattr_time
=
0
;
gossip_debug
(
GOSSIP_NAME_DEBUG
,
...
...
fs/orangefs/orangefs-kernel.h
浏览文件 @
4cd8f319
...
...
@@ -548,6 +548,8 @@ extern struct mutex request_mutex;
extern
int
debug
;
extern
int
op_timeout_secs
;
extern
int
slot_timeout_secs
;
extern
int
dcache_timeout_msecs
;
extern
int
getattr_timeout_msecs
;
extern
struct
list_head
orangefs_superblocks
;
extern
spinlock_t
orangefs_superblocks_lock
;
extern
struct
list_head
orangefs_request_list
;
...
...
fs/orangefs/orangefs-mod.c
浏览文件 @
4cd8f319
...
...
@@ -47,6 +47,8 @@ struct client_debug_mask client_debug_mask = { NULL, 0, 0 };
unsigned
int
kernel_mask_set_mod_init
;
/* implicitly false */
int
op_timeout_secs
=
ORANGEFS_DEFAULT_OP_TIMEOUT_SECS
;
int
slot_timeout_secs
=
ORANGEFS_DEFAULT_SLOT_TIMEOUT_SECS
;
int
dcache_timeout_msecs
=
1000
;
int
getattr_timeout_msecs
=
1000
;
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"ORANGEFS Development Team"
);
...
...
fs/orangefs/orangefs-sysfs.c
浏览文件 @
4cd8f319
...
...
@@ -61,10 +61,21 @@
* Slots are requested and waited for,
* the wait times out after slot_timeout_secs.
*
* What: /sys/fs/orangefs/dcache_timeout_msecs
* Date: Jul 2016
* Contact: Martin Brandenburg <martin@omnibond.com>
* Description:
* Time lookup is valid in milliseconds.
*
* What: /sys/fs/orangefs/getattr_timeout_msecs
* Date: Jul 2016
* Contact: Martin Brandenburg <martin@omnibond.com>
* Description:
* Time getattr is valid in milliseconds.
*
* What: /sys/fs/orangefs/acache/...
* Date: Jun 2015
* Contact: M
ike Marshall <hubcap
@omnibond.com>
* Contact: M
artin Brandenburg <martin
@omnibond.com>
* Description:
* Attribute cache configurable settings.
*
...
...
@@ -117,6 +128,8 @@ struct orangefs_obj {
int
perf_history_size
;
int
perf_time_interval_secs
;
int
slot_timeout_secs
;
int
dcache_timeout_msecs
;
int
getattr_timeout_msecs
;
};
struct
acache_orangefs_obj
{
...
...
@@ -658,6 +671,20 @@ static ssize_t sysfs_int_show(char *kobj_id, char *buf, void *attr)
"%d
\n
"
,
slot_timeout_secs
);
goto
out
;
}
else
if
(
!
strcmp
(
orangefs_attr
->
attr
.
name
,
"dcache_timeout_msecs"
))
{
rc
=
scnprintf
(
buf
,
PAGE_SIZE
,
"%d
\n
"
,
dcache_timeout_msecs
);
goto
out
;
}
else
if
(
!
strcmp
(
orangefs_attr
->
attr
.
name
,
"getattr_timeout_msecs"
))
{
rc
=
scnprintf
(
buf
,
PAGE_SIZE
,
"%d
\n
"
,
getattr_timeout_msecs
);
goto
out
;
}
else
{
goto
out
;
}
...
...
@@ -734,6 +761,12 @@ static ssize_t int_store(struct orangefs_obj *orangefs_obj,
}
else
if
(
!
strcmp
(
attr
->
attr
.
name
,
"slot_timeout_secs"
))
{
rc
=
kstrtoint
(
buf
,
0
,
&
slot_timeout_secs
);
goto
out
;
}
else
if
(
!
strcmp
(
attr
->
attr
.
name
,
"dcache_timeout_msecs"
))
{
rc
=
kstrtoint
(
buf
,
0
,
&
dcache_timeout_msecs
);
goto
out
;
}
else
if
(
!
strcmp
(
attr
->
attr
.
name
,
"getattr_timeout_msecs"
))
{
rc
=
kstrtoint
(
buf
,
0
,
&
getattr_timeout_msecs
);
goto
out
;
}
else
{
goto
out
;
}
...
...
@@ -1361,6 +1394,12 @@ static struct orangefs_attribute op_timeout_secs_attribute =
static
struct
orangefs_attribute
slot_timeout_secs_attribute
=
__ATTR
(
slot_timeout_secs
,
0664
,
int_orangefs_show
,
int_store
);
static
struct
orangefs_attribute
dcache_timeout_msecs_attribute
=
__ATTR
(
dcache_timeout_msecs
,
0664
,
int_orangefs_show
,
int_store
);
static
struct
orangefs_attribute
getattr_timeout_msecs_attribute
=
__ATTR
(
getattr_timeout_msecs
,
0664
,
int_orangefs_show
,
int_store
);
static
struct
orangefs_attribute
perf_counter_reset_attribute
=
__ATTR
(
perf_counter_reset
,
0664
,
...
...
@@ -1382,6 +1421,8 @@ static struct orangefs_attribute perf_time_interval_secs_attribute =
static
struct
attribute
*
orangefs_default_attrs
[]
=
{
&
op_timeout_secs_attribute
.
attr
,
&
slot_timeout_secs_attribute
.
attr
,
&
dcache_timeout_msecs_attribute
.
attr
,
&
getattr_timeout_msecs_attribute
.
attr
,
&
perf_counter_reset_attribute
.
attr
,
&
perf_history_size_attribute
.
attr
,
&
perf_time_interval_secs_attribute
.
attr
,
...
...
fs/orangefs/orangefs-utils.c
浏览文件 @
4cd8f319
...
...
@@ -347,7 +347,7 @@ int orangefs_inode_getattr(struct inode *inode, int new, int bypass)
inode
->
i_mode
=
type
|
(
is_root_handle
(
inode
)
?
S_ISVTX
:
0
)
|
orangefs_inode_perms
(
&
new_op
->
downcall
.
resp
.
getattr
.
attributes
);
orangefs_inode
->
getattr_time
=
jiffies
+
HZ
;
orangefs_inode
->
getattr_time
=
jiffies
+
getattr_timeout_msecs
*
HZ
/
1000
;
ret
=
0
;
out:
op_release
(
new_op
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录