Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock

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

 



On 12/12/21 3:02 AM, Geert Uytterhoeven wrote:
> Hi Jens,
> 
> On Fri, Dec 10, 2021 at 7:52 PM Jens Axboe <axboe@xxxxxxxxx> wrote:
>> On Mon, Dec 6, 2021 at 12:04 AM Christoph Hellwig <hch@xxxxxx> wrote:
>>> mtdblock / mtdblock_ro set part_bits to 0 and thus nevever scanned
>>> partitions.  Restore that behavior by setting the GENHD_FL_NO_PART flag.
>>>
>>> Fixes: 1ebe2e5f9d68e94c ("block: remove GENHD_FL_EXT_DEVT")
>>> Reported-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>>> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
>>> Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> 
>>> @@ -355,9 +355,11 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
>>>                                  "%s%c%c", tr->name,
>>>                                  'a' - 1 + new->devnum / 26,
>>>                                  'a' + new->devnum % 26);
>>> -       else
>>> +       } else {
>>>                 snprintf(gd->disk_name, sizeof(gd->disk_name),
>>>                          "%s%d", tr->name, new->devnum);
>>> +               gd->flags |= GENHD_FL_NO_PART;
>>> +       }
>>
>> Not sure why I didn't spot this until now, but:
>>
>> drivers/mtd/mtd_blkdevs.c: In function ‘add_mtd_blktrans_dev’:
>> drivers/mtd/mtd_blkdevs.c:362:30: error: ‘GENHD_FL_NO_PART’ undeclared (first use in this function); did you mean ‘GENHD_FL_NO_PART_SCAN’?
>>   362 |                 gd->flags |= GENHD_FL_NO_PART;
>>       |                              ^~~~~~~~~~~~~~~~
>>       |                              GENHD_FL_NO_PART_SCAN
>> drivers/mtd/mtd_blkdevs.c:362:30: note: each undeclared identifier is reported only once for each function it appears in
>>
>> Hmm?
>>
>> I'm going to revert this one for now, not sure how it could've been
>> tested in this form.
> 
> Because next-20211130 and later have commit 46e7eac647b34ed4 ("block:
> rename GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART").

I guess that explains it, it ended up in the wrong branch...

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux