Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
26b8256e
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
152
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
26b8256e
编写于
1月 29, 2008
作者:
J
Jens Axboe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
block: get rid of unnecessary forward declarations in blk-core.c
Signed-off-by:
N
Jens Axboe
<
jens.axboe@oracle.com
>
上级
86db1e29
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
30 addition
and
32 deletion
+30
-32
block/blk-core.c
block/blk-core.c
+30
-32
未找到文件。
block/blk-core.c
浏览文件 @
26b8256e
...
@@ -33,9 +33,7 @@
...
@@ -33,9 +33,7 @@
#include "blk.h"
#include "blk.h"
static
void
drive_stat_acct
(
struct
request
*
rq
,
int
new_io
);
static
int
__make_request
(
struct
request_queue
*
q
,
struct
bio
*
bio
);
static
int
__make_request
(
struct
request_queue
*
q
,
struct
bio
*
bio
);
static
void
blk_recalc_rq_segments
(
struct
request
*
rq
);
/*
/*
* For the allocated request tables
* For the allocated request tables
...
@@ -54,6 +52,21 @@ static struct workqueue_struct *kblockd_workqueue;
...
@@ -54,6 +52,21 @@ static struct workqueue_struct *kblockd_workqueue;
static
DEFINE_PER_CPU
(
struct
list_head
,
blk_cpu_done
);
static
DEFINE_PER_CPU
(
struct
list_head
,
blk_cpu_done
);
static
void
drive_stat_acct
(
struct
request
*
rq
,
int
new_io
)
{
int
rw
=
rq_data_dir
(
rq
);
if
(
!
blk_fs_request
(
rq
)
||
!
rq
->
rq_disk
)
return
;
if
(
!
new_io
)
{
__disk_stat_inc
(
rq
->
rq_disk
,
merges
[
rw
]);
}
else
{
disk_round_stats
(
rq
->
rq_disk
);
rq
->
rq_disk
->
in_flight
++
;
}
}
void
blk_queue_congestion_threshold
(
struct
request_queue
*
q
)
void
blk_queue_congestion_threshold
(
struct
request_queue
*
q
)
{
{
int
nr
;
int
nr
;
...
@@ -168,21 +181,6 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
...
@@ -168,21 +181,6 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
EXPORT_SYMBOL
(
blk_dump_rq_flags
);
EXPORT_SYMBOL
(
blk_dump_rq_flags
);
void
blk_recount_segments
(
struct
request_queue
*
q
,
struct
bio
*
bio
)
{
struct
request
rq
;
struct
bio
*
nxt
=
bio
->
bi_next
;
rq
.
q
=
q
;
rq
.
bio
=
rq
.
biotail
=
bio
;
bio
->
bi_next
=
NULL
;
blk_recalc_rq_segments
(
&
rq
);
bio
->
bi_next
=
nxt
;
bio
->
bi_phys_segments
=
rq
.
nr_phys_segments
;
bio
->
bi_hw_segments
=
rq
.
nr_hw_segments
;
bio
->
bi_flags
|=
(
1
<<
BIO_SEG_VALID
);
}
EXPORT_SYMBOL
(
blk_recount_segments
);
static
void
blk_recalc_rq_segments
(
struct
request
*
rq
)
static
void
blk_recalc_rq_segments
(
struct
request
*
rq
)
{
{
int
nr_phys_segs
;
int
nr_phys_segs
;
...
@@ -255,6 +253,21 @@ static void blk_recalc_rq_segments(struct request *rq)
...
@@ -255,6 +253,21 @@ static void blk_recalc_rq_segments(struct request *rq)
rq
->
nr_hw_segments
=
nr_hw_segs
;
rq
->
nr_hw_segments
=
nr_hw_segs
;
}
}
void
blk_recount_segments
(
struct
request_queue
*
q
,
struct
bio
*
bio
)
{
struct
request
rq
;
struct
bio
*
nxt
=
bio
->
bi_next
;
rq
.
q
=
q
;
rq
.
bio
=
rq
.
biotail
=
bio
;
bio
->
bi_next
=
NULL
;
blk_recalc_rq_segments
(
&
rq
);
bio
->
bi_next
=
nxt
;
bio
->
bi_phys_segments
=
rq
.
nr_phys_segments
;
bio
->
bi_hw_segments
=
rq
.
nr_hw_segments
;
bio
->
bi_flags
|=
(
1
<<
BIO_SEG_VALID
);
}
EXPORT_SYMBOL
(
blk_recount_segments
);
static
int
blk_phys_contig_segment
(
struct
request_queue
*
q
,
struct
bio
*
bio
,
static
int
blk_phys_contig_segment
(
struct
request_queue
*
q
,
struct
bio
*
bio
,
struct
bio
*
nxt
)
struct
bio
*
nxt
)
{
{
...
@@ -1305,21 +1318,6 @@ void blk_insert_request(struct request_queue *q, struct request *rq,
...
@@ -1305,21 +1318,6 @@ void blk_insert_request(struct request_queue *q, struct request *rq,
EXPORT_SYMBOL
(
blk_insert_request
);
EXPORT_SYMBOL
(
blk_insert_request
);
static
void
drive_stat_acct
(
struct
request
*
rq
,
int
new_io
)
{
int
rw
=
rq_data_dir
(
rq
);
if
(
!
blk_fs_request
(
rq
)
||
!
rq
->
rq_disk
)
return
;
if
(
!
new_io
)
{
__disk_stat_inc
(
rq
->
rq_disk
,
merges
[
rw
]);
}
else
{
disk_round_stats
(
rq
->
rq_disk
);
rq
->
rq_disk
->
in_flight
++
;
}
}
/*
/*
* add-request adds a request to the linked list.
* add-request adds a request to the linked list.
* queue lock is held and interrupts disabled, as we muck with the
* queue lock is held and interrupts disabled, as we muck with the
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录