diff options
author | Christoph Hellwig <hch@lst.de> | 2023-06-08 13:02:29 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-12 08:04:03 -0600 |
commit | 9d1c92872e7082f100f629a58b32fa0214aa1aec (patch) | |
tree | 5674b55326a5a01ae2e19ae3839b099968fc1a54 /drivers/scsi | |
parent | fece685cc7bbb5e1af89f891223c31c3bcc969f7 (diff) | |
download | lwn-9d1c92872e7082f100f629a58b32fa0214aa1aec.tar.gz lwn-9d1c92872e7082f100f629a58b32fa0214aa1aec.zip |
block: also call ->open for incremental partition opens
For whole devices ->open is called for each open, but for partitions it
is only called on the first open of a partition, e.g.:
open("/dev/vdb", ...)
open("/dev/vdb", ...)
- 2 call to ->open
open("/dev/vdb1", ...)
open("/dev/vdb", ...)
- 2 call to ->open
open("/dev/vdb", ...)
open("/dev/vdb", ...)
- just open call to ->open
This is problematic as various block drivers look at open flags and
might not do all the required setup if the earlier open was with an
odd flag like O_NDELAY or the magic 3 ioctl-only open mode.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Phillip Potter <phil@philpotter.co.uk>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230608110258.189493-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi')
0 files changed, 0 insertions, 0 deletions