diff options
author | Christoph Hellwig <hch@lst.de> | 2020-10-29 17:58:36 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-11-16 18:14:30 +0300 |
commit | 302cfee150291c6cd85b1ca197d062d0b423d09c (patch) | |
tree | 33c062c77cd6f8b4fb01d168003458c02008a8be /drivers/block/amiflop.c | |
parent | bbc26e8d93946e23c20e63830fc6e69345ec63b3 (diff) | |
download | linux-302cfee150291c6cd85b1ca197d062d0b423d09c.tar.xz |
floppy: use a separate gendisk for each media format
The floppy driver usually autodetects the media when used with the
normal /dev/fd? devices, which also are the only nodes created by udev.
But it also supports various aliases that force a given media format.
That is currently supported using the blk_register_region framework
which finds the floppy gendisk even for a 'mismatched' dev_t. The
problem with this (besides the code complexity) is that it creates
multiple struct block_device instances for the whole device of a
single gendisk, which can lead to interesting issues in code not
aware of that fact.
To fix this just create a separate gendisk for each of the aliases
if they are accessed.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/amiflop.c')
0 files changed, 0 insertions, 0 deletions