Thread (12 messages) 12 messages, 2 authors, 2020-05-07

Re: [PATCH 1/1] s390/dasd: remove ioctl_by_bdev from DASD driver

From: Christoph Hellwig <hch@lst.de>
Date: 2020-05-05 12:44:27
Also in: linux-s390, lkml

On Mon, May 04, 2020 at 10:45:33AM +0200, Stefan Haberland wrote:
quoted
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help