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
d33fb4fe
Commit
d33fb4fe
authored
May 21, 2002
by
Alexander Viro
Committed by
Linus Torvalds
May 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] md.c cleanup
Removes dev_unit() and messing with kdev_t in match_dev_unit()
parent
726761cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
drivers/md/md.c
drivers/md/md.c
+4
-16
No files found.
drivers/md/md.c
View file @
d33fb4fe
...
...
@@ -571,25 +571,13 @@ static int check_disk_sb(mdk_rdev_t * rdev)
return
ret
;
}
static
kdev_t
dev_unit
(
kdev_t
dev
)
{
unsigned
int
mask
;
struct
gendisk
*
hd
=
get_gendisk
(
dev
);
if
(
!
hd
)
return
NODEV
;
mask
=
~
((
1
<<
hd
->
minor_shift
)
-
1
);
return
mk_kdev
(
major
(
dev
),
minor
(
dev
)
&
mask
);
}
static
mdk_rdev_t
*
match_dev_unit
(
mddev_t
*
mddev
,
kdev_t
dev
)
static
mdk_rdev_t
*
match_dev_unit
(
mddev_t
*
mddev
,
mdk_rdev_t
*
dev
)
{
struct
list_head
*
tmp
;
mdk_rdev_t
*
rdev
;
ITERATE_RDEV
(
mddev
,
rdev
,
tmp
)
if
(
kdev_same
(
dev_unit
(
rdev
->
dev
),
dev_unit
(
dev
))
)
if
(
rdev
->
bdev
->
bd_contains
==
dev
->
bdev
->
bd_contains
)
return
rdev
;
return
NULL
;
...
...
@@ -601,7 +589,7 @@ static int match_mddev_units(mddev_t *mddev1, mddev_t *mddev2)
mdk_rdev_t
*
rdev
;
ITERATE_RDEV
(
mddev1
,
rdev
,
tmp
)
if
(
match_dev_unit
(
mddev2
,
rdev
->
dev
))
if
(
match_dev_unit
(
mddev2
,
rdev
))
return
1
;
return
0
;
...
...
@@ -618,7 +606,7 @@ static void bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
MD_BUG
();
return
;
}
same_pdev
=
match_dev_unit
(
mddev
,
rdev
->
dev
);
same_pdev
=
match_dev_unit
(
mddev
,
rdev
);
if
(
same_pdev
)
printk
(
KERN_WARNING
"md%d: WARNING: %s appears to be on the same physical disk as %s. True
\n
"
...
...
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