Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
dde1e1ec
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看板
提交
dde1e1ec
编写于
12月 11, 2017
作者:
M
Mike Snitzer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dm: remove now unused bio-based io_pool and _io_cache
Signed-off-by:
N
Mike Snitzer
<
snitzer@redhat.com
>
上级
64f52b0e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
30 deletion
+2
-30
drivers/md/dm-core.h
drivers/md/dm-core.h
+0
-2
drivers/md/dm.c
drivers/md/dm.c
+2
-28
未找到文件。
drivers/md/dm-core.h
浏览文件 @
dde1e1ec
...
...
@@ -92,8 +92,6 @@ struct mapped_device {
* io objects are allocated from here.
*/
struct
bio_set
*
io_bs
;
mempool_t
*
io_pool
;
struct
bio_set
*
bs
;
/*
...
...
drivers/md/dm.c
浏览文件 @
dde1e1ec
...
...
@@ -149,7 +149,6 @@ static int dm_numa_node = DM_NUMA_NODE;
* For mempools pre-allocation at the table loading time.
*/
struct
dm_md_mempools
{
mempool_t
*
io_pool
;
struct
bio_set
*
bs
;
struct
bio_set
*
io_bs
;
};
...
...
@@ -160,7 +159,6 @@ struct table_device {
struct
dm_dev
dm_dev
;
};
static
struct
kmem_cache
*
_io_cache
;
static
struct
kmem_cache
*
_rq_tio_cache
;
static
struct
kmem_cache
*
_rq_cache
;
...
...
@@ -227,14 +225,9 @@ static int __init local_init(void)
{
int
r
=
-
ENOMEM
;
/* allocate a slab for the dm_ios */
_io_cache
=
KMEM_CACHE
(
dm_io
,
0
);
if
(
!
_io_cache
)
return
r
;
_rq_tio_cache
=
KMEM_CACHE
(
dm_rq_target_io
,
0
);
if
(
!
_rq_tio_cache
)
goto
out_free_io_cache
;
return
r
;
_rq_cache
=
kmem_cache_create
(
"dm_old_clone_request"
,
sizeof
(
struct
request
),
__alignof__
(
struct
request
),
0
,
NULL
);
...
...
@@ -269,8 +262,6 @@ static int __init local_init(void)
kmem_cache_destroy
(
_rq_cache
);
out_free_rq_tio_cache:
kmem_cache_destroy
(
_rq_tio_cache
);
out_free_io_cache:
kmem_cache_destroy
(
_io_cache
);
return
r
;
}
...
...
@@ -282,7 +273,6 @@ static void local_exit(void)
kmem_cache_destroy
(
_rq_cache
);
kmem_cache_destroy
(
_rq_tio_cache
);
kmem_cache_destroy
(
_io_cache
);
unregister_blkdev
(
_major
,
_name
);
dm_uevent_exit
();
...
...
@@ -1698,7 +1688,6 @@ static void cleanup_mapped_device(struct mapped_device *md)
destroy_workqueue
(
md
->
wq
);
if
(
md
->
kworker_task
)
kthread_stop
(
md
->
kworker_task
);
mempool_destroy
(
md
->
io_pool
);
if
(
md
->
bs
)
bioset_free
(
md
->
bs
);
if
(
md
->
io_bs
)
...
...
@@ -1881,14 +1870,6 @@ static void __bind_mempools(struct mapped_device *md, struct dm_table *t)
bioset_free
(
md
->
io_bs
);
md
->
io_bs
=
NULL
;
}
if
(
md
->
io_pool
)
{
/*
* Reload io_pool because pool_size may have changed
* because a different table was loaded.
*/
mempool_destroy
(
md
->
io_pool
);
md
->
io_pool
=
NULL
;
}
}
else
if
(
md
->
bs
)
{
/*
...
...
@@ -1902,10 +1883,8 @@ static void __bind_mempools(struct mapped_device *md, struct dm_table *t)
goto
out
;
}
BUG_ON
(
!
p
||
md
->
io_pool
||
md
->
bs
||
md
->
io_bs
);
BUG_ON
(
!
p
||
md
->
bs
||
md
->
io_bs
);
md
->
io_pool
=
p
->
io_pool
;
p
->
io_pool
=
NULL
;
md
->
bs
=
p
->
bs
;
p
->
bs
=
NULL
;
md
->
io_bs
=
p
->
io_bs
;
...
...
@@ -2816,9 +2795,6 @@ struct dm_md_mempools *dm_alloc_md_mempools(struct mapped_device *md, enum dm_qu
goto
out
;
if
(
integrity
&&
bioset_integrity_create
(
pools
->
io_bs
,
pool_size
))
goto
out
;
pools
->
io_pool
=
mempool_create_slab_pool
(
pool_size
,
_io_cache
);
if
(
!
pools
->
io_pool
)
goto
out
;
break
;
case
DM_TYPE_REQUEST_BASED
:
case
DM_TYPE_MQ_REQUEST_BASED
:
...
...
@@ -2850,8 +2826,6 @@ void dm_free_md_mempools(struct dm_md_mempools *pools)
if
(
!
pools
)
return
;
mempool_destroy
(
pools
->
io_pool
);
if
(
pools
->
bs
)
bioset_free
(
pools
->
bs
);
if
(
pools
->
io_bs
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录