Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a7120771
Commit
a7120771
authored
Oct 11, 2011
by
NeilBrown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
md/linear: remove typedefs: dev_info_t -> struct dev_info
Signed-off-by:
NeilBrown
<
neilb@suse.de
>
parent
0f6d02d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
drivers/md/linear.c
drivers/md/linear.c
+5
-5
drivers/md/linear.h
drivers/md/linear.h
+1
-3
No files found.
drivers/md/linear.c
View file @
a7120771
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
/*
/*
* find which device holds a particular offset
* find which device holds a particular offset
*/
*/
static
inline
dev_info_t
*
which_dev
(
struct
mddev
*
mddev
,
sector_t
sector
)
static
inline
struct
dev_info
*
which_dev
(
struct
mddev
*
mddev
,
sector_t
sector
)
{
{
int
lo
,
mid
,
hi
;
int
lo
,
mid
,
hi
;
linear_conf_t
*
conf
;
linear_conf_t
*
conf
;
...
@@ -64,7 +64,7 @@ static int linear_mergeable_bvec(struct request_queue *q,
...
@@ -64,7 +64,7 @@ static int linear_mergeable_bvec(struct request_queue *q,
struct
bio_vec
*
biovec
)
struct
bio_vec
*
biovec
)
{
{
struct
mddev
*
mddev
=
q
->
queuedata
;
struct
mddev
*
mddev
=
q
->
queuedata
;
dev_info_t
*
dev0
;
struct
dev_info
*
dev0
;
unsigned
long
maxsectors
,
bio_sectors
=
bvm
->
bi_size
>>
9
;
unsigned
long
maxsectors
,
bio_sectors
=
bvm
->
bi_size
>>
9
;
sector_t
sector
=
bvm
->
bi_sector
+
get_start_sect
(
bvm
->
bi_bdev
);
sector_t
sector
=
bvm
->
bi_sector
+
get_start_sect
(
bvm
->
bi_bdev
);
...
@@ -129,7 +129,7 @@ static linear_conf_t *linear_conf(struct mddev *mddev, int raid_disks)
...
@@ -129,7 +129,7 @@ static linear_conf_t *linear_conf(struct mddev *mddev, int raid_disks)
struct
md_rdev
*
rdev
;
struct
md_rdev
*
rdev
;
int
i
,
cnt
;
int
i
,
cnt
;
conf
=
kzalloc
(
sizeof
(
*
conf
)
+
raid_disks
*
sizeof
(
dev_info_t
),
conf
=
kzalloc
(
sizeof
(
*
conf
)
+
raid_disks
*
sizeof
(
struct
dev_info
),
GFP_KERNEL
);
GFP_KERNEL
);
if
(
!
conf
)
if
(
!
conf
)
return
NULL
;
return
NULL
;
...
@@ -139,7 +139,7 @@ static linear_conf_t *linear_conf(struct mddev *mddev, int raid_disks)
...
@@ -139,7 +139,7 @@ static linear_conf_t *linear_conf(struct mddev *mddev, int raid_disks)
list_for_each_entry
(
rdev
,
&
mddev
->
disks
,
same_set
)
{
list_for_each_entry
(
rdev
,
&
mddev
->
disks
,
same_set
)
{
int
j
=
rdev
->
raid_disk
;
int
j
=
rdev
->
raid_disk
;
dev_info_t
*
disk
=
conf
->
disks
+
j
;
struct
dev_info
*
disk
=
conf
->
disks
+
j
;
sector_t
sectors
;
sector_t
sectors
;
if
(
j
<
0
||
j
>=
raid_disks
||
disk
->
rdev
)
{
if
(
j
<
0
||
j
>=
raid_disks
||
disk
->
rdev
)
{
...
@@ -266,7 +266,7 @@ static int linear_stop (struct mddev *mddev)
...
@@ -266,7 +266,7 @@ static int linear_stop (struct mddev *mddev)
static
int
linear_make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
static
int
linear_make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
{
{
dev_info_t
*
tmp_dev
;
struct
dev_info
*
tmp_dev
;
sector_t
start_sector
;
sector_t
start_sector
;
if
(
unlikely
(
bio
->
bi_rw
&
REQ_FLUSH
))
{
if
(
unlikely
(
bio
->
bi_rw
&
REQ_FLUSH
))
{
...
...
drivers/md/linear.h
View file @
a7120771
...
@@ -6,13 +6,11 @@ struct dev_info {
...
@@ -6,13 +6,11 @@ struct dev_info {
sector_t
end_sector
;
sector_t
end_sector
;
};
};
typedef
struct
dev_info
dev_info_t
;
struct
linear_private_data
struct
linear_private_data
{
{
struct
rcu_head
rcu
;
struct
rcu_head
rcu
;
sector_t
array_sectors
;
sector_t
array_sectors
;
dev_info_t
disks
[
0
];
struct
dev_info
disks
[
0
];
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment