Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
9ea06415
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看板
提交
9ea06415
编写于
2月 03, 2016
作者:
S
Shaohua Li
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'mymd/for-next' into mymd/for-linus
上级
b37a05c0
fc2561ec
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
61 addition
and
56 deletion
+61
-56
MAINTAINERS
MAINTAINERS
+1
-0
drivers/md/bitmap.c
drivers/md/bitmap.c
+0
-4
drivers/md/faulty.c
drivers/md/faulty.c
+9
-9
drivers/md/md-cluster.c
drivers/md/md-cluster.c
+5
-1
drivers/md/raid1.c
drivers/md/raid1.c
+11
-10
drivers/md/raid10.c
drivers/md/raid10.c
+10
-10
drivers/md/raid5.c
drivers/md/raid5.c
+23
-22
include/linux/raid/pq.h
include/linux/raid/pq.h
+2
-0
未找到文件。
MAINTAINERS
浏览文件 @
9ea06415
...
...
@@ -10174,6 +10174,7 @@ S: Supported
F: drivers/media/pci/solo6x10/
SOFTWARE RAID (Multiple Disks) SUPPORT
M: Shaohua Li <shli@kernel.org>
L: linux-raid@vger.kernel.org
T: git git://neil.brown.name/md
S: Supported
...
...
drivers/md/bitmap.c
浏览文件 @
9ea06415
...
...
@@ -210,10 +210,6 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait)
struct
block_device
*
bdev
;
struct
mddev
*
mddev
=
bitmap
->
mddev
;
struct
bitmap_storage
*
store
=
&
bitmap
->
storage
;
int
node_offset
=
0
;
if
(
mddev_is_clustered
(
bitmap
->
mddev
))
node_offset
=
bitmap
->
cluster_slot
*
store
->
file_pages
;
while
((
rdev
=
next_active_rdev
(
rdev
,
mddev
))
!=
NULL
)
{
int
size
=
PAGE_SIZE
;
...
...
drivers/md/faulty.c
浏览文件 @
9ea06415
...
...
@@ -170,7 +170,7 @@ static void add_sector(struct faulty_conf *conf, sector_t start, int mode)
conf
->
nfaults
=
n
+
1
;
}
static
void
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
static
void
faulty_
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
{
struct
faulty_conf
*
conf
=
mddev
->
private
;
int
failit
=
0
;
...
...
@@ -226,7 +226,7 @@ static void make_request(struct mddev *mddev, struct bio *bio)
generic_make_request
(
bio
);
}
static
void
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
static
void
faulty_
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
{
struct
faulty_conf
*
conf
=
mddev
->
private
;
int
n
;
...
...
@@ -259,7 +259,7 @@ static void status(struct seq_file *seq, struct mddev *mddev)
}
static
int
reshape
(
struct
mddev
*
mddev
)
static
int
faulty_
reshape
(
struct
mddev
*
mddev
)
{
int
mode
=
mddev
->
new_layout
&
ModeMask
;
int
count
=
mddev
->
new_layout
>>
ModeShift
;
...
...
@@ -299,7 +299,7 @@ static sector_t faulty_size(struct mddev *mddev, sector_t sectors, int raid_disk
return
sectors
;
}
static
int
run
(
struct
mddev
*
mddev
)
static
int
faulty_
run
(
struct
mddev
*
mddev
)
{
struct
md_rdev
*
rdev
;
int
i
;
...
...
@@ -327,7 +327,7 @@ static int run(struct mddev *mddev)
md_set_array_sectors
(
mddev
,
faulty_size
(
mddev
,
0
,
0
));
mddev
->
private
=
conf
;
reshape
(
mddev
);
faulty_
reshape
(
mddev
);
return
0
;
}
...
...
@@ -344,11 +344,11 @@ static struct md_personality faulty_personality =
.
name
=
"faulty"
,
.
level
=
LEVEL_FAULTY
,
.
owner
=
THIS_MODULE
,
.
make_request
=
make_request
,
.
run
=
run
,
.
make_request
=
faulty_
make_request
,
.
run
=
faulty_
run
,
.
free
=
faulty_free
,
.
status
=
status
,
.
check_reshape
=
reshape
,
.
status
=
faulty_
status
,
.
check_reshape
=
faulty_
reshape
,
.
size
=
faulty_size
,
};
...
...
drivers/md/md-cluster.c
浏览文件 @
9ea06415
...
...
@@ -293,6 +293,7 @@ static void recover_bitmaps(struct md_thread *thread)
dlm_unlock:
dlm_unlock_sync
(
bm_lockres
);
clear_bit:
lockres_free
(
bm_lockres
);
clear_bit
(
slot
,
&
cinfo
->
recovery_map
);
}
}
...
...
@@ -682,8 +683,10 @@ static int gather_all_resync_info(struct mddev *mddev, int total_slots)
bm_lockres
=
lockres_init
(
mddev
,
str
,
NULL
,
1
);
if
(
!
bm_lockres
)
return
-
ENOMEM
;
if
(
i
==
(
cinfo
->
slot_number
-
1
))
if
(
i
==
(
cinfo
->
slot_number
-
1
))
{
lockres_free
(
bm_lockres
);
continue
;
}
bm_lockres
->
flags
|=
DLM_LKF_NOQUEUE
;
ret
=
dlm_lock_sync
(
bm_lockres
,
DLM_LOCK_PW
);
...
...
@@ -858,6 +861,7 @@ static int leave(struct mddev *mddev)
lockres_free
(
cinfo
->
token_lockres
);
lockres_free
(
cinfo
->
ack_lockres
);
lockres_free
(
cinfo
->
no_new_dev_lockres
);
lockres_free
(
cinfo
->
resync_lockres
);
lockres_free
(
cinfo
->
bitmap_lockres
);
unlock_all_bitmaps
(
mddev
);
dlm_release_lockspace
(
cinfo
->
lockspace
,
2
);
...
...
drivers/md/raid1.c
浏览文件 @
9ea06415
...
...
@@ -1044,7 +1044,7 @@ static void raid1_unplug(struct blk_plug_cb *cb, bool from_schedule)
kfree
(
plug
);
}
static
void
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
static
void
raid1_
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
{
struct
r1conf
*
conf
=
mddev
->
private
;
struct
raid1_info
*
mirror
;
...
...
@@ -1422,7 +1422,7 @@ static void make_request(struct mddev *mddev, struct bio * bio)
wake_up
(
&
conf
->
wait_barrier
);
}
static
void
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
static
void
raid1_
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
{
struct
r1conf
*
conf
=
mddev
->
private
;
int
i
;
...
...
@@ -1439,7 +1439,7 @@ static void status(struct seq_file *seq, struct mddev *mddev)
seq_printf
(
seq
,
"]"
);
}
static
void
error
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
static
void
raid1_
error
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
{
char
b
[
BDEVNAME_SIZE
];
struct
r1conf
*
conf
=
mddev
->
private
;
...
...
@@ -2472,7 +2472,8 @@ static int init_resync(struct r1conf *conf)
* that can be installed to exclude normal IO requests.
*/
static
sector_t
sync_request
(
struct
mddev
*
mddev
,
sector_t
sector_nr
,
int
*
skipped
)
static
sector_t
raid1_sync_request
(
struct
mddev
*
mddev
,
sector_t
sector_nr
,
int
*
skipped
)
{
struct
r1conf
*
conf
=
mddev
->
private
;
struct
r1bio
*
r1_bio
;
...
...
@@ -2890,7 +2891,7 @@ static struct r1conf *setup_conf(struct mddev *mddev)
}
static
void
raid1_free
(
struct
mddev
*
mddev
,
void
*
priv
);
static
int
run
(
struct
mddev
*
mddev
)
static
int
r
aid1_r
un
(
struct
mddev
*
mddev
)
{
struct
r1conf
*
conf
;
int
i
;
...
...
@@ -3170,15 +3171,15 @@ static struct md_personality raid1_personality =
.
name
=
"raid1"
,
.
level
=
1
,
.
owner
=
THIS_MODULE
,
.
make_request
=
make_request
,
.
run
=
run
,
.
make_request
=
raid1_
make_request
,
.
run
=
r
aid1_r
un
,
.
free
=
raid1_free
,
.
status
=
status
,
.
error_handler
=
error
,
.
status
=
raid1_
status
,
.
error_handler
=
raid1_
error
,
.
hot_add_disk
=
raid1_add_disk
,
.
hot_remove_disk
=
raid1_remove_disk
,
.
spare_active
=
raid1_spare_active
,
.
sync_request
=
sync_request
,
.
sync_request
=
raid1_
sync_request
,
.
resize
=
raid1_resize
,
.
size
=
raid1_size
,
.
check_reshape
=
raid1_reshape
,
...
...
drivers/md/raid10.c
浏览文件 @
9ea06415
...
...
@@ -1442,7 +1442,7 @@ static void __make_request(struct mddev *mddev, struct bio *bio)
one_write_done
(
r10_bio
);
}
static
void
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
static
void
raid10_
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
{
struct
r10conf
*
conf
=
mddev
->
private
;
sector_t
chunk_mask
=
(
conf
->
geo
.
chunk_mask
&
conf
->
prev
.
chunk_mask
);
...
...
@@ -1484,7 +1484,7 @@ static void make_request(struct mddev *mddev, struct bio *bio)
wake_up
(
&
conf
->
wait_barrier
);
}
static
void
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
static
void
raid10_
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
{
struct
r10conf
*
conf
=
mddev
->
private
;
int
i
;
...
...
@@ -1562,7 +1562,7 @@ static int enough(struct r10conf *conf, int ignore)
_enough
(
conf
,
1
,
ignore
);
}
static
void
error
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
static
void
raid10_
error
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
{
char
b
[
BDEVNAME_SIZE
];
struct
r10conf
*
conf
=
mddev
->
private
;
...
...
@@ -2802,7 +2802,7 @@ static int init_resync(struct r10conf *conf)
*
*/
static
sector_t
sync_request
(
struct
mddev
*
mddev
,
sector_t
sector_nr
,
static
sector_t
raid10_
sync_request
(
struct
mddev
*
mddev
,
sector_t
sector_nr
,
int
*
skipped
)
{
struct
r10conf
*
conf
=
mddev
->
private
;
...
...
@@ -3523,7 +3523,7 @@ static struct r10conf *setup_conf(struct mddev *mddev)
return
ERR_PTR
(
err
);
}
static
int
run
(
struct
mddev
*
mddev
)
static
int
r
aid10_r
un
(
struct
mddev
*
mddev
)
{
struct
r10conf
*
conf
;
int
i
,
disk_idx
,
chunk_size
;
...
...
@@ -4617,15 +4617,15 @@ static struct md_personality raid10_personality =
.
name
=
"raid10"
,
.
level
=
10
,
.
owner
=
THIS_MODULE
,
.
make_request
=
make_request
,
.
run
=
run
,
.
make_request
=
raid10_
make_request
,
.
run
=
r
aid10_r
un
,
.
free
=
raid10_free
,
.
status
=
status
,
.
error_handler
=
error
,
.
status
=
raid10_
status
,
.
error_handler
=
raid10_
error
,
.
hot_add_disk
=
raid10_add_disk
,
.
hot_remove_disk
=
raid10_remove_disk
,
.
spare_active
=
raid10_spare_active
,
.
sync_request
=
sync_request
,
.
sync_request
=
raid10_
sync_request
,
.
quiesce
=
raid10_quiesce
,
.
size
=
raid10_size
,
.
resize
=
raid10_resize
,
...
...
drivers/md/raid5.c
浏览文件 @
9ea06415
...
...
@@ -2496,7 +2496,7 @@ static void raid5_build_block(struct stripe_head *sh, int i, int previous)
dev
->
sector
=
raid5_compute_blocknr
(
sh
,
i
,
previous
);
}
static
void
error
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
static
void
raid5_
error
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
{
char
b
[
BDEVNAME_SIZE
];
struct
r5conf
*
conf
=
mddev
->
private
;
...
...
@@ -2958,7 +2958,7 @@ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx,
* If several bio share a stripe. The bio bi_phys_segments acts as a
* reference count to avoid race. The reference count should already be
* increased before this function is called (for example, in
* make_request()), so other bio sharing this stripe will not free the
*
raid5_
make_request()), so other bio sharing this stripe will not free the
* stripe. If a stripe is owned by one stripe, the stripe lock will
* protect it.
*/
...
...
@@ -5135,7 +5135,7 @@ static void make_discard_request(struct mddev *mddev, struct bio *bi)
}
}
static
void
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bi
)
static
void
raid5_
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bi
)
{
struct
r5conf
*
conf
=
mddev
->
private
;
int
dd_idx
;
...
...
@@ -5225,7 +5225,7 @@ static void make_request(struct mddev *mddev, struct bio * bi)
new_sector
=
raid5_compute_sector
(
conf
,
logical_sector
,
previous
,
&
dd_idx
,
NULL
);
pr_debug
(
"raid456: make_request, sector %llu logical %llu
\n
"
,
pr_debug
(
"raid456:
raid5_
make_request, sector %llu logical %llu
\n
"
,
(
unsigned
long
long
)
new_sector
,
(
unsigned
long
long
)
logical_sector
);
...
...
@@ -5575,7 +5575,8 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, int *sk
return
retn
;
}
static
inline
sector_t
sync_request
(
struct
mddev
*
mddev
,
sector_t
sector_nr
,
int
*
skipped
)
static
inline
sector_t
raid5_sync_request
(
struct
mddev
*
mddev
,
sector_t
sector_nr
,
int
*
skipped
)
{
struct
r5conf
*
conf
=
mddev
->
private
;
struct
stripe_head
*
sh
;
...
...
@@ -6674,7 +6675,7 @@ static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded
return
0
;
}
static
int
run
(
struct
mddev
*
mddev
)
static
int
r
aid5_r
un
(
struct
mddev
*
mddev
)
{
struct
r5conf
*
conf
;
int
working_disks
=
0
;
...
...
@@ -7048,7 +7049,7 @@ static void raid5_free(struct mddev *mddev, void *priv)
mddev
->
to_remove
=
&
raid5_attrs_group
;
}
static
void
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
static
void
raid5_
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
{
struct
r5conf
*
conf
=
mddev
->
private
;
int
i
;
...
...
@@ -7864,15 +7865,15 @@ static struct md_personality raid6_personality =
.
name
=
"raid6"
,
.
level
=
6
,
.
owner
=
THIS_MODULE
,
.
make_request
=
make_request
,
.
run
=
run
,
.
make_request
=
raid5_
make_request
,
.
run
=
r
aid5_r
un
,
.
free
=
raid5_free
,
.
status
=
status
,
.
error_handler
=
error
,
.
status
=
raid5_
status
,
.
error_handler
=
raid5_
error
,
.
hot_add_disk
=
raid5_add_disk
,
.
hot_remove_disk
=
raid5_remove_disk
,
.
spare_active
=
raid5_spare_active
,
.
sync_request
=
sync_request
,
.
sync_request
=
raid5_
sync_request
,
.
resize
=
raid5_resize
,
.
size
=
raid5_size
,
.
check_reshape
=
raid6_check_reshape
,
...
...
@@ -7887,15 +7888,15 @@ static struct md_personality raid5_personality =
.
name
=
"raid5"
,
.
level
=
5
,
.
owner
=
THIS_MODULE
,
.
make_request
=
make_request
,
.
run
=
run
,
.
make_request
=
raid5_
make_request
,
.
run
=
r
aid5_r
un
,
.
free
=
raid5_free
,
.
status
=
status
,
.
error_handler
=
error
,
.
status
=
raid5_
status
,
.
error_handler
=
raid5_
error
,
.
hot_add_disk
=
raid5_add_disk
,
.
hot_remove_disk
=
raid5_remove_disk
,
.
spare_active
=
raid5_spare_active
,
.
sync_request
=
sync_request
,
.
sync_request
=
raid5_
sync_request
,
.
resize
=
raid5_resize
,
.
size
=
raid5_size
,
.
check_reshape
=
raid5_check_reshape
,
...
...
@@ -7911,15 +7912,15 @@ static struct md_personality raid4_personality =
.
name
=
"raid4"
,
.
level
=
4
,
.
owner
=
THIS_MODULE
,
.
make_request
=
make_request
,
.
run
=
run
,
.
make_request
=
raid5_
make_request
,
.
run
=
r
aid5_r
un
,
.
free
=
raid5_free
,
.
status
=
status
,
.
error_handler
=
error
,
.
status
=
raid5_
status
,
.
error_handler
=
raid5_
error
,
.
hot_add_disk
=
raid5_add_disk
,
.
hot_remove_disk
=
raid5_remove_disk
,
.
spare_active
=
raid5_spare_active
,
.
sync_request
=
sync_request
,
.
sync_request
=
raid5_
sync_request
,
.
resize
=
raid5_resize
,
.
size
=
raid5_size
,
.
check_reshape
=
raid5_check_reshape
,
...
...
include/linux/raid/pq.h
浏览文件 @
9ea06415
...
...
@@ -152,6 +152,8 @@ void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
# define jiffies raid6_jiffies()
# define printk printf
# define pr_err(format, ...) fprintf(stderr, format, ## __VA_ARGS__)
# define pr_info(format, ...) fprintf(stdout, format, ## __VA_ARGS__)
# define GFP_KERNEL 0
# define __get_free_pages(x, y) ((unsigned long)mmap(NULL, PAGE_SIZE << (y), \
PROT_READ|PROT_WRITE, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录