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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 30.04.20 um 15:13 schrieb Christoph Hellwig:
> On Thu, Apr 30, 2020 at 01:17:54PM +0200, Stefan Haberland wrote:
>> Remove the calls to ioctl_by_bdev from the DASD partition detection code
>> to enable the removal of the specific code.
>>
>> To do so reuse the gendisk private_data pointer and not only provide a
>> pointer to the devmap but provide a new structure containing a pointer
>> to the devmap as well as all required information for the partition
>> detection. This makes it independent from the dasd_information2_t
>> structure.
> I think sharing the data structure in private data is pretty dangerous.

Thought of this as well. This is why I check for the major number before I
use the private pointer to reference the data structure. Thought this would
be enough checking.
Do you think this is not sufficient?

> In the meantime I thought of another idea - the partition code could
> do a symbol_get of a symbol exported by the dasd driver and use that
> to query the information.

Then I would need to export a lot of DASD internal structures to be
available
in thepartition detection code if I would like to walk down our device
map to
findthe corresponding device for example. Not sure if this is that easy.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux