Re: [PATCH 01/26] block: refactor device number setup in __device_add_disk

2021-05-24 Thread Christoph Hellwig
On Sun, May 23, 2021 at 09:46:01AM +0200, Hannes Reinecke wrote: > ... and also fixes an issue with GENHD_FL_UP remained set in an error path > in __device_add_disk(). Well, the error path in __device_add_disk is a complete disaster right now, but Luis is looking into it fortunately.

Re: [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk

2021-05-24 Thread Christoph Hellwig
On Fri, May 21, 2021 at 05:16:46PM +, Luis Chamberlain wrote: > > - /* in consecutive minor range? */ > > - if (bdev->bd_partno < disk->minors) { > > - *devt = MKDEV(disk->major, disk->first_minor + bdev->bd_partno); > > - return 0; > > - } > > - > > It is not obvious

Re: [PATCH 01/26] block: refactor device number setup in __device_add_disk

2021-05-23 Thread Hannes Reinecke
On 5/21/21 7:50 AM, Christoph Hellwig wrote: Untangle the mess around blk_alloc_devt by moving the check for the used allocation scheme into the callers. Signed-off-by: Christoph Hellwig --- block/blk.h | 4 +- block/genhd.c | 96 ---

Re: [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk

2021-05-21 Thread Luis Chamberlain
On Fri, May 21, 2021 at 07:50:51AM +0200, Christoph Hellwig wrote: > diff --git a/block/genhd.c b/block/genhd.c > index 39ca97b0edc6..2c00bc3261d9 100644 > --- a/block/genhd.c > +++ b/block/genhd.c > @@ -335,52 +335,22 @@ static int blk_mangle_minor(int minor) <-- snip --> > -int blk_alloc_devt(s

[PATCH 01/26] block: refactor device number setup in __device_add_disk

2021-05-20 Thread Christoph Hellwig
Untangle the mess around blk_alloc_devt by moving the check for the used allocation scheme into the callers. Signed-off-by: Christoph Hellwig --- block/blk.h | 4 +- block/genhd.c | 96 - block/partitions/core.c | 15 +-- 3 files