Messages in this thread | | | Date | Tue, 5 May 2020 14:44:23 +0200 | From | Christoph Hellwig <> | Subject | Re: [PATCH 1/1] s390/dasd: remove ioctl_by_bdev from DASD driver |
| |
On Mon, May 04, 2020 at 10:45:33AM +0200, Stefan Haberland wrote: > > findthe corresponding device for example. Not sure if this is that easy. > > I did some additional research on this. > What I could imagine: > > The gendisk->private_data pointer currently contains a pointer to > the dasd_devmap structure. This one is also reachable by iterating > over an exported dasd_hashlist. > So I could export the dasd_hashlist symbol, iterate over it and try > to find the dasd_devmap pointer I have from the gendisk->private_data > pointer. > This would ensure that the gendisk belongs to the DASD driver and I > could use the additional information that is somehow reachable through > the gendisk->private_data pointer. > > But again, I am not sure if this additional code and effort is needed. > From my point of view checking the gendisk->major for DASD_MAJOR is > OK to ensure that the device belongs to the DASD driver.
With CONFIG_DEBUG_BLOCK_EXT_DEVT you can't rely on major numbers.
And compared to all the complications I think the biodasdinfo method is the least of all those evils. Jens, any opinion?
| |