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
8f1ae43d
Commit
8f1ae43d
authored
Oct 11, 2011
by
NeilBrown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
md/faulty: remove typedef: conf_t -> struct faulty_conf
Signed-off-by:
NeilBrown
<
neilb@suse.de
>
parent
a7120771
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
drivers/md/faulty.c
drivers/md/faulty.c
+10
-10
No files found.
drivers/md/faulty.c
View file @
8f1ae43d
...
@@ -81,16 +81,16 @@ static void faulty_fail(struct bio *bio, int error)
...
@@ -81,16 +81,16 @@ static void faulty_fail(struct bio *bio, int error)
bio_io_error
(
b
);
bio_io_error
(
b
);
}
}
typedef
struct
faulty_conf
{
struct
faulty_conf
{
int
period
[
Modes
];
int
period
[
Modes
];
atomic_t
counters
[
Modes
];
atomic_t
counters
[
Modes
];
sector_t
faults
[
MaxFault
];
sector_t
faults
[
MaxFault
];
int
modes
[
MaxFault
];
int
modes
[
MaxFault
];
int
nfaults
;
int
nfaults
;
struct
md_rdev
*
rdev
;
struct
md_rdev
*
rdev
;
}
conf_t
;
};
static
int
check_mode
(
conf_t
*
conf
,
int
mode
)
static
int
check_mode
(
struct
faulty_conf
*
conf
,
int
mode
)
{
{
if
(
conf
->
period
[
mode
]
==
0
&&
if
(
conf
->
period
[
mode
]
==
0
&&
atomic_read
(
&
conf
->
counters
[
mode
])
<=
0
)
atomic_read
(
&
conf
->
counters
[
mode
])
<=
0
)
...
@@ -105,7 +105,7 @@ static int check_mode(conf_t *conf, int mode)
...
@@ -105,7 +105,7 @@ static int check_mode(conf_t *conf, int mode)
return
0
;
return
0
;
}
}
static
int
check_sector
(
conf_t
*
conf
,
sector_t
start
,
sector_t
end
,
int
dir
)
static
int
check_sector
(
struct
faulty_conf
*
conf
,
sector_t
start
,
sector_t
end
,
int
dir
)
{
{
/* If we find a ReadFixable sector, we fix it ... */
/* If we find a ReadFixable sector, we fix it ... */
int
i
;
int
i
;
...
@@ -129,7 +129,7 @@ static int check_sector(conf_t *conf, sector_t start, sector_t end, int dir)
...
@@ -129,7 +129,7 @@ static int check_sector(conf_t *conf, sector_t start, sector_t end, int dir)
return
0
;
return
0
;
}
}
static
void
add_sector
(
conf_t
*
conf
,
sector_t
start
,
int
mode
)
static
void
add_sector
(
struct
faulty_conf
*
conf
,
sector_t
start
,
int
mode
)
{
{
int
i
;
int
i
;
int
n
=
conf
->
nfaults
;
int
n
=
conf
->
nfaults
;
...
@@ -171,7 +171,7 @@ static void add_sector(conf_t *conf, sector_t start, int mode)
...
@@ -171,7 +171,7 @@ static void add_sector(conf_t *conf, sector_t start, int mode)
static
int
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
static
int
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
{
{
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
int
failit
=
0
;
int
failit
=
0
;
if
(
bio_data_dir
(
bio
)
==
WRITE
)
{
if
(
bio_data_dir
(
bio
)
==
WRITE
)
{
...
@@ -224,7 +224,7 @@ static int make_request(struct mddev *mddev, struct bio *bio)
...
@@ -224,7 +224,7 @@ static int make_request(struct mddev *mddev, struct bio *bio)
static
void
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
static
void
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
{
{
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
int
n
;
int
n
;
if
((
n
=
atomic_read
(
&
conf
->
counters
[
WriteTransient
]))
!=
0
)
if
((
n
=
atomic_read
(
&
conf
->
counters
[
WriteTransient
]))
!=
0
)
...
@@ -259,7 +259,7 @@ static int reshape(struct mddev *mddev)
...
@@ -259,7 +259,7 @@ static int reshape(struct mddev *mddev)
{
{
int
mode
=
mddev
->
new_layout
&
ModeMask
;
int
mode
=
mddev
->
new_layout
&
ModeMask
;
int
count
=
mddev
->
new_layout
>>
ModeShift
;
int
count
=
mddev
->
new_layout
>>
ModeShift
;
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
if
(
mddev
->
new_layout
<
0
)
if
(
mddev
->
new_layout
<
0
)
return
0
;
return
0
;
...
@@ -299,7 +299,7 @@ static int run(struct mddev *mddev)
...
@@ -299,7 +299,7 @@ static int run(struct mddev *mddev)
{
{
struct
md_rdev
*
rdev
;
struct
md_rdev
*
rdev
;
int
i
;
int
i
;
conf_t
*
conf
;
struct
faulty_conf
*
conf
;
if
(
md_check_no_bitmap
(
mddev
))
if
(
md_check_no_bitmap
(
mddev
))
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -327,7 +327,7 @@ static int run(struct mddev *mddev)
...
@@ -327,7 +327,7 @@ static int run(struct mddev *mddev)
static
int
stop
(
struct
mddev
*
mddev
)
static
int
stop
(
struct
mddev
*
mddev
)
{
{
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
kfree
(
conf
);
kfree
(
conf
);
mddev
->
private
=
NULL
;
mddev
->
private
=
NULL
;
...
...
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