Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
745dc570
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看板
提交
745dc570
编写于
12月 11, 2017
作者:
M
Mike Snitzer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dm: rename 'bio' member of dm_io structure to 'orig_bio'
Signed-off-by:
N
Mike Snitzer
<
snitzer@redhat.com
>
上级
2abf1fc9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
14 deletion
+14
-14
drivers/md/dm.c
drivers/md/dm.c
+14
-14
未找到文件。
drivers/md/dm.c
浏览文件 @
745dc570
...
...
@@ -60,13 +60,13 @@ void dm_issue_global_event(void)
}
/*
* One of these is allocated per bio.
* One of these is allocated per
original
bio.
*/
struct
dm_io
{
struct
mapped_device
*
md
;
blk_status_t
status
;
atomic_t
io_count
;
struct
bio
*
bio
;
struct
bio
*
orig_
bio
;
unsigned
long
start_time
;
spinlock_t
endio_lock
;
struct
dm_stats_aux
stats_aux
;
...
...
@@ -510,7 +510,7 @@ int md_in_flight(struct mapped_device *md)
static
void
start_io_acct
(
struct
dm_io
*
io
)
{
struct
mapped_device
*
md
=
io
->
md
;
struct
bio
*
bio
=
io
->
bio
;
struct
bio
*
bio
=
io
->
orig_
bio
;
int
cpu
;
int
rw
=
bio_data_dir
(
bio
);
...
...
@@ -531,7 +531,7 @@ static void start_io_acct(struct dm_io *io)
static
void
end_io_acct
(
struct
dm_io
*
io
)
{
struct
mapped_device
*
md
=
io
->
md
;
struct
bio
*
bio
=
io
->
bio
;
struct
bio
*
bio
=
io
->
orig_
bio
;
unsigned
long
duration
=
jiffies
-
io
->
start_time
;
int
pending
;
int
rw
=
bio_data_dir
(
bio
);
...
...
@@ -771,8 +771,7 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
/* Push-back supersedes any I/O errors */
if
(
unlikely
(
error
))
{
spin_lock_irqsave
(
&
io
->
endio_lock
,
flags
);
if
(
!
(
io
->
status
==
BLK_STS_DM_REQUEUE
&&
__noflush_suspending
(
md
)))
if
(
!
(
io
->
status
==
BLK_STS_DM_REQUEUE
&&
__noflush_suspending
(
md
)))
io
->
status
=
error
;
spin_unlock_irqrestore
(
&
io
->
endio_lock
,
flags
);
}
...
...
@@ -784,7 +783,8 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
*/
spin_lock_irqsave
(
&
md
->
deferred_lock
,
flags
);
if
(
__noflush_suspending
(
md
))
bio_list_add_head
(
&
md
->
deferred
,
io
->
bio
);
/* NOTE early return due to BLK_STS_DM_REQUEUE below */
bio_list_add_head
(
&
md
->
deferred
,
io
->
orig_bio
);
else
/* noflush suspend was interrupted. */
io
->
status
=
BLK_STS_IOERR
;
...
...
@@ -792,7 +792,7 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
}
io_error
=
io
->
status
;
bio
=
io
->
bio
;
bio
=
io
->
orig_
bio
;
end_io_acct
(
io
);
free_io
(
md
,
io
);
...
...
@@ -1038,7 +1038,7 @@ void dm_remap_zone_report(struct dm_target *ti, struct bio *bio, sector_t start)
{
#ifdef CONFIG_BLK_DEV_ZONED
struct
dm_target_io
*
tio
=
container_of
(
bio
,
struct
dm_target_io
,
clone
);
struct
bio
*
report_bio
=
tio
->
io
->
bio
;
struct
bio
*
report_bio
=
tio
->
io
->
orig_
bio
;
struct
blk_zone_report_hdr
*
hdr
=
NULL
;
struct
blk_zone
*
zone
;
unsigned
int
nr_rep
=
0
;
...
...
@@ -1129,7 +1129,7 @@ static void __map_bio(struct dm_target_io *tio)
case
DM_MAPIO_REMAPPED
:
/* the bio has been remapped so dispatch it */
trace_block_bio_remap
(
clone
->
bi_disk
->
queue
,
clone
,
bio_dev
(
tio
->
io
->
bio
),
sector
);
bio_dev
(
tio
->
io
->
orig_
bio
),
sector
);
generic_make_request
(
clone
);
break
;
case
DM_MAPIO_KILL
:
...
...
@@ -1441,7 +1441,7 @@ static void __split_and_process_bio(struct mapped_device *md,
ci
.
io
=
alloc_io
(
md
);
ci
.
io
->
status
=
0
;
atomic_set
(
&
ci
.
io
->
io_count
,
1
);
ci
.
io
->
bio
=
bio
;
ci
.
io
->
orig_
bio
=
bio
;
ci
.
io
->
md
=
md
;
spin_lock_init
(
&
ci
.
io
->
endio_lock
);
ci
.
sector
=
bio
->
bi_iter
.
bi_sector
;
...
...
@@ -1468,15 +1468,15 @@ static void __split_and_process_bio(struct mapped_device *md,
* so that it gets handled *after* bios already submitted
* have been completely processed.
* We take a clone of the original to store in
* ci.io->bio to be used by end_io_acct() and
* ci.io->
orig_
bio to be used by end_io_acct() and
* for dec_pending to use for completion handling.
* As this path is not used for REQ_OP_ZONE_REPORT,
* the usage of io->bio in dm_remap_zone_report()
* the usage of io->
orig_
bio in dm_remap_zone_report()
* won't be affected by this reassignment.
*/
struct
bio
*
b
=
bio_clone_bioset
(
bio
,
GFP_NOIO
,
md
->
queue
->
bio_split
);
ci
.
io
->
bio
=
b
;
ci
.
io
->
orig_
bio
=
b
;
bio_advance
(
bio
,
(
bio_sectors
(
bio
)
-
ci
.
sector_count
)
<<
9
);
bio_chain
(
b
,
bio
);
generic_make_request
(
bio
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录