Re: [dm-devel] [PATCH 01/31] block: also call ->open for incremental partition opens

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:20AM +0200, Christoph Hellwig wrote: > For whole devices ->open is called for each open, but for partitions it > is only called on the first open of a partition. This is problematic > as various block drivers look at open flags and might not do all setup > for ioctl o

Re: [dm-devel] [PATCH 01/31] block: also call ->open for incremental partition opens

2023-06-07 Thread Hannes Reinecke
On 6/6/23 09:39, Christoph Hellwig wrote: For whole devices ->open is called for each open, but for partitions it is only called on the first open of a partition. This is problematic as various block drivers look at open flags and might not do all setup for ioctl only or NDELAY opens. Signed-of

Re: [dm-devel] [PATCH 01/31] block: also call ->open for incremental partition opens

2023-06-07 Thread Christoph Hellwig
On Wed, Jun 07, 2023 at 10:14:22AM +0200, Christian Brauner wrote: > This assumes that all drivers deal with additional ->open() calls for > each partition correctly which I assumed you checked so, They have to, because they already get the additional open for extra opens of the whole device. The

[dm-devel] [PATCH 01/31] block: also call ->open for incremental partition opens

2023-06-06 Thread Christoph Hellwig
For whole devices ->open is called for each open, but for partitions it is only called on the first open of a partition. This is problematic as various block drivers look at open flags and might not do all setup for ioctl only or NDELAY opens. Signed-off-by: Christoph Hellwig --- block/bdev.c |