mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
md: Export and rename find_rdev_nr_rcu
This is required by the clustering module (patches to follow) to find the device to remove or re-add. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
fb56dfef4e
commit
57d051dcca
@ -642,7 +642,7 @@ void mddev_unlock(struct mddev *mddev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mddev_unlock);
|
||||
|
||||
static struct md_rdev *find_rdev_nr_rcu(struct mddev *mddev, int nr)
|
||||
struct md_rdev *md_find_rdev_nr_rcu(struct mddev *mddev, int nr)
|
||||
{
|
||||
struct md_rdev *rdev;
|
||||
|
||||
@ -652,6 +652,7 @@ static struct md_rdev *find_rdev_nr_rcu(struct mddev *mddev, int nr)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(md_find_rdev_nr_rcu);
|
||||
|
||||
static struct md_rdev *find_rdev(struct mddev *mddev, dev_t dev)
|
||||
{
|
||||
@ -2049,11 +2050,11 @@ static int bind_rdev_to_array(struct md_rdev *rdev, struct mddev *mddev)
|
||||
int choice = 0;
|
||||
if (mddev->pers)
|
||||
choice = mddev->raid_disks;
|
||||
while (find_rdev_nr_rcu(mddev, choice))
|
||||
while (md_find_rdev_nr_rcu(mddev, choice))
|
||||
choice++;
|
||||
rdev->desc_nr = choice;
|
||||
} else {
|
||||
if (find_rdev_nr_rcu(mddev, rdev->desc_nr)) {
|
||||
if (md_find_rdev_nr_rcu(mddev, rdev->desc_nr)) {
|
||||
rcu_read_unlock();
|
||||
return -EBUSY;
|
||||
}
|
||||
@ -5721,7 +5722,7 @@ static int get_disk_info(struct mddev *mddev, void __user * arg)
|
||||
return -EFAULT;
|
||||
|
||||
rcu_read_lock();
|
||||
rdev = find_rdev_nr_rcu(mddev, info.number);
|
||||
rdev = md_find_rdev_nr_rcu(mddev, info.number);
|
||||
if (rdev) {
|
||||
info.major = MAJOR(rdev->bdev->bd_dev);
|
||||
info.minor = MINOR(rdev->bdev->bd_dev);
|
||||
|
@ -672,6 +672,7 @@ extern void md_unplug(struct blk_plug_cb *cb, bool from_schedule);
|
||||
extern void md_reload_sb(struct mddev *mddev);
|
||||
extern void md_update_sb(struct mddev *mddev, int force);
|
||||
extern void md_kick_rdev_from_array(struct md_rdev * rdev);
|
||||
struct md_rdev *md_find_rdev_nr_rcu(struct mddev *mddev, int nr);
|
||||
static inline int mddev_check_plugged(struct mddev *mddev)
|
||||
{
|
||||
return !!blk_check_plugged(md_unplug, mddev,
|
||||
|
Loading…
Reference in New Issue
Block a user