Re: [PATCH 09/23] md: rewrite md_setup_drive to avoid ioctls

2020-07-16 Thread Christoph Hellwig
On Thu, Jul 16, 2020 at 09:50:49AM +1000, NeilBrown wrote: > I'd be more comfortable if you added something like > if (WARN(bdev->bd_disk->fops != md_fops, > "Opening block device %x resulted in non-md device\")) > return; > here. However even without that >

Re: [PATCH 09/23] md: rewrite md_setup_drive to avoid ioctls

2020-07-15 Thread NeilBrown
On Tue, Jul 14 2020, Christoph Hellwig wrote: > 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 instea

[PATCH 09/23] md: rewrite md_setup_drive to avoid ioctls

2020-07-14 Thread Christoph Hellwig
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 Acked-by: Song Li