Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
7457e6e2
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7457e6e2
编写于
7月 23, 2006
作者:
J
Jens Axboe
提交者:
Jens Axboe
9月 30, 2006
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] blktrace: support for logging metadata reads
Signed-off-by:
N
Jens Axboe
<
axboe@suse.de
>
上级
374f84ac
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
1 deletion
+5
-1
block/blktrace.c
block/blktrace.c
+4
-1
include/linux/blktrace_api.h
include/linux/blktrace_api.h
+1
-0
未找到文件。
block/blktrace.c
浏览文件 @
7457e6e2
...
@@ -69,7 +69,7 @@ static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK
...
@@ -69,7 +69,7 @@ static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK
/*
/*
* Bio action bits of interest
* Bio action bits of interest
*/
*/
static
u32
bio_act
[
5
]
__read_mostly
=
{
0
,
BLK_TC_ACT
(
BLK_TC_BARRIER
),
BLK_TC_ACT
(
BLK_TC_SYNC
),
0
,
BLK_TC_ACT
(
BLK_TC_AHEAD
)
};
static
u32
bio_act
[
9
]
__read_mostly
=
{
0
,
BLK_TC_ACT
(
BLK_TC_BARRIER
),
BLK_TC_ACT
(
BLK_TC_SYNC
),
0
,
BLK_TC_ACT
(
BLK_TC_AHEAD
),
0
,
0
,
0
,
BLK_TC_ACT
(
BLK_TC_META
)
};
/*
/*
* More could be added as needed, taking care to increment the decrementer
* More could be added as needed, taking care to increment the decrementer
...
@@ -81,6 +81,8 @@ static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_AC
...
@@ -81,6 +81,8 @@ static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_AC
(((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1))
(((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1))
#define trace_ahead_bit(rw) \
#define trace_ahead_bit(rw) \
(((rw) & (1 << BIO_RW_AHEAD)) << (2 - BIO_RW_AHEAD))
(((rw) & (1 << BIO_RW_AHEAD)) << (2 - BIO_RW_AHEAD))
#define trace_meta_bit(rw) \
(((rw) & (1 << BIO_RW_META)) >> (BIO_RW_META - 3))
/*
/*
* The worker for the various blk_add_trace*() types. Fills out a
* The worker for the various blk_add_trace*() types. Fills out a
...
@@ -103,6 +105,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
...
@@ -103,6 +105,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
what
|=
bio_act
[
trace_barrier_bit
(
rw
)];
what
|=
bio_act
[
trace_barrier_bit
(
rw
)];
what
|=
bio_act
[
trace_sync_bit
(
rw
)];
what
|=
bio_act
[
trace_sync_bit
(
rw
)];
what
|=
bio_act
[
trace_ahead_bit
(
rw
)];
what
|=
bio_act
[
trace_ahead_bit
(
rw
)];
what
|=
bio_act
[
trace_meta_bit
(
rw
)];
pid
=
tsk
->
pid
;
pid
=
tsk
->
pid
;
if
(
unlikely
(
act_log_check
(
bt
,
what
,
sector
,
pid
)))
if
(
unlikely
(
act_log_check
(
bt
,
what
,
sector
,
pid
)))
...
...
include/linux/blktrace_api.h
浏览文件 @
7457e6e2
...
@@ -20,6 +20,7 @@ enum blktrace_cat {
...
@@ -20,6 +20,7 @@ enum blktrace_cat {
BLK_TC_PC
=
1
<<
9
,
/* pc requests */
BLK_TC_PC
=
1
<<
9
,
/* pc requests */
BLK_TC_NOTIFY
=
1
<<
10
,
/* special message */
BLK_TC_NOTIFY
=
1
<<
10
,
/* special message */
BLK_TC_AHEAD
=
1
<<
11
,
/* readahead */
BLK_TC_AHEAD
=
1
<<
11
,
/* readahead */
BLK_TC_META
=
1
<<
12
,
/* metadata */
BLK_TC_END
=
1
<<
15
,
/* only 16-bits, reminder */
BLK_TC_END
=
1
<<
15
,
/* only 16-bits, reminder */
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录