diff options
author | Christoph Hellwig | 2020-06-07 17:31:19 +0200 |
---|---|---|
committer | Christoph Hellwig | 2020-07-16 17:59:24 +0200 |
commit | 7e0adbfc20c50b021e425662834a492f958efee7 (patch) | |
tree | c6a176e2026960733c16fe189f9cb7d9653c0671 /drivers/md/md.h | |
parent | d1100488c3ce11b853785cf15ee4c19bfab4c842 (diff) |
md: rewrite md_setup_drive to avoid ioctls
md_setup_drive knows it works with md devices, so it is rather pointless
to open a file descriptor and issue ioctls. Just call directly into the
relevant low-level md routines after getting a handle to the device using
blkdev_get_by_dev instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: NeilBrown <neilb@suse.de>
Acked-by: Song Liu <song@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 6f8fff77ce10..ada3106cb1dd 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -801,7 +801,15 @@ static inline void mddev_check_write_zeroes(struct mddev *mddev, struct bio *bio mddev->queue->limits.max_write_zeroes_sectors = 0; } +struct mdu_array_info_s; +struct mdu_disk_info_s; + extern int mdp_major; void md_autostart_arrays(int part); +int md_set_array_info(struct mddev *mddev, struct mdu_array_info_s *info); +int md_add_new_disk(struct mddev *mddev, struct mdu_disk_info_s *info); +int do_md_run(struct mddev *mddev); + +extern const struct block_device_operations md_fops; #endif /* _MD_MD_H */ |