All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-06  7:04 ` Christoph Hellwig
  0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2021-12-06  7:04 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-block, Geert Uytterhoeven

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@glider.be>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/mtd/mtd_blkdevs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 113f86df76038..243f28a3206b4 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -346,7 +346,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
 	gd->minors = 1 << tr->part_bits;
 	gd->fops = &mtd_block_ops;
 
-	if (tr->part_bits)
+	if (tr->part_bits) {
 		if (new->devnum < 26)
 			snprintf(gd->disk_name, sizeof(gd->disk_name),
 				 "%s%c", tr->name, 'a' + new->devnum);
@@ -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;
+	}
 
 	set_capacity(gd, ((u64)new->size * tr->blksize) >> 9);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-06  7:04 ` Christoph Hellwig
  0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2021-12-06  7:04 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-block, Geert Uytterhoeven

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@glider.be>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/mtd/mtd_blkdevs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 113f86df76038..243f28a3206b4 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -346,7 +346,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
 	gd->minors = 1 << tr->part_bits;
 	gd->fops = &mtd_block_ops;
 
-	if (tr->part_bits)
+	if (tr->part_bits) {
 		if (new->devnum < 26)
 			snprintf(gd->disk_name, sizeof(gd->disk_name),
 				 "%s%c", tr->name, 'a' + new->devnum);
@@ -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;
+	}
 
 	set_capacity(gd, ((u64)new->size * tr->blksize) >> 9);
 
-- 
2.30.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
  2021-12-06  7:04 ` Christoph Hellwig
@ 2021-12-06 16:47   ` Jens Axboe
  -1 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-06 16:47 UTC (permalink / raw)
  To: miquel.raynal, Christoph Hellwig, vigneshr, richard
  Cc: Geert Uytterhoeven, linux-block, linux-mtd

On Mon, 6 Dec 2021 08:04:09 +0100, Christoph Hellwig 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.
> 
> 

Applied, thanks!

[1/1] mtd_blkdevs: don't scan partitions for plain mtdblock
      commit: 776b54e97a7d993ba23696e032426d5dea5bbe70

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-06 16:47   ` Jens Axboe
  0 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-06 16:47 UTC (permalink / raw)
  To: miquel.raynal, Christoph Hellwig, vigneshr, richard
  Cc: Geert Uytterhoeven, linux-block, linux-mtd

On Mon, 6 Dec 2021 08:04:09 +0100, Christoph Hellwig 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.
> 
> 

Applied, thanks!

[1/1] mtd_blkdevs: don't scan partitions for plain mtdblock
      commit: 776b54e97a7d993ba23696e032426d5dea5bbe70

Best regards,
-- 
Jens Axboe



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
  2021-12-06  7:04 ` Christoph Hellwig
@ 2021-12-10 18:52   ` Jens Axboe
  -1 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-10 18:52 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	linux-mtd @ lists . infradead . org, linux-block,
	Geert Uytterhoeven

On Mon, Dec 6, 2021 at 12:04 AM Christoph Hellwig <hch@lst.de> 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@glider.be>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/mtd/mtd_blkdevs.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
> index 113f86df76038..243f28a3206b4 100644
> --- a/drivers/mtd/mtd_blkdevs.c
> +++ b/drivers/mtd/mtd_blkdevs.c
> @@ -346,7 +346,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
>         gd->minors = 1 << tr->part_bits;
>         gd->fops = &mtd_block_ops;
>
> -       if (tr->part_bits)
> +       if (tr->part_bits) {
>                 if (new->devnum < 26)
>                         snprintf(gd->disk_name, sizeof(gd->disk_name),
>                                  "%s%c", tr->name, 'a' + new->devnum);
> @@ -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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-10 18:52   ` Jens Axboe
  0 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-10 18:52 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	linux-mtd @ lists . infradead . org, linux-block,
	Geert Uytterhoeven

On Mon, Dec 6, 2021 at 12:04 AM Christoph Hellwig <hch@lst.de> 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@glider.be>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/mtd/mtd_blkdevs.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
> index 113f86df76038..243f28a3206b4 100644
> --- a/drivers/mtd/mtd_blkdevs.c
> +++ b/drivers/mtd/mtd_blkdevs.c
> @@ -346,7 +346,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
>         gd->minors = 1 << tr->part_bits;
>         gd->fops = &mtd_block_ops;
>
> -       if (tr->part_bits)
> +       if (tr->part_bits) {
>                 if (new->devnum < 26)
>                         snprintf(gd->disk_name, sizeof(gd->disk_name),
>                                  "%s%c", tr->name, 'a' + new->devnum);
> @@ -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.

-- 
Jens Axboe


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
  2021-12-10 18:52   ` Jens Axboe
@ 2021-12-12 10:02     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-12-12 10:02 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd @ lists . infradead . org,
	linux-block, Geert Uytterhoeven

Hi Jens,

On Fri, Dec 10, 2021 at 7:52 PM Jens Axboe <axboe@kernel.dk> wrote:
> On Mon, Dec 6, 2021 at 12:04 AM Christoph Hellwig <hch@lst.de> 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@glider.be>
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

> > @@ -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").

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-12 10:02     ` Geert Uytterhoeven
  0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-12-12 10:02 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd @ lists . infradead . org,
	linux-block, Geert Uytterhoeven

Hi Jens,

On Fri, Dec 10, 2021 at 7:52 PM Jens Axboe <axboe@kernel.dk> wrote:
> On Mon, Dec 6, 2021 at 12:04 AM Christoph Hellwig <hch@lst.de> 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@glider.be>
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

> > @@ -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").

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
  2021-12-12 10:02     ` Geert Uytterhoeven
@ 2021-12-12 19:19       ` Jens Axboe
  -1 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-12 19:19 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Christoph Hellwig, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd @ lists . infradead . org,
	linux-block, Geert Uytterhoeven

On 12/12/21 3:02 AM, Geert Uytterhoeven wrote:
> Hi Jens,
> 
> On Fri, Dec 10, 2021 at 7:52 PM Jens Axboe <axboe@kernel.dk> wrote:
>> On Mon, Dec 6, 2021 at 12:04 AM Christoph Hellwig <hch@lst.de> 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@glider.be>
>>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>>> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
>>> @@ -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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-12 19:19       ` Jens Axboe
  0 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-12 19:19 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Christoph Hellwig, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd @ lists . infradead . org,
	linux-block, Geert Uytterhoeven

On 12/12/21 3:02 AM, Geert Uytterhoeven wrote:
> Hi Jens,
> 
> On Fri, Dec 10, 2021 at 7:52 PM Jens Axboe <axboe@kernel.dk> wrote:
>> On Mon, Dec 6, 2021 at 12:04 AM Christoph Hellwig <hch@lst.de> 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@glider.be>
>>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>>> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
>>> @@ -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


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
  2021-12-10 18:52   ` Jens Axboe
@ 2021-12-13  7:26     ` Christoph Hellwig
  -1 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2021-12-13  7:26 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd @ lists . infradead . org,
	linux-block, Geert Uytterhoeven

On Fri, Dec 10, 2021 at 11:52:26AM -0700, Jens Axboe wrote:
> > Fixes: 1ebe2e5f9d68e94c ("block: remove GENHD_FL_EXT_DEVT")
> > Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

> 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.

It was tested in a tree that also contains the commit identified by the
Fixed tag, which is in the for-next tree but not the block-5.16 one.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-13  7:26     ` Christoph Hellwig
  0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2021-12-13  7:26 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd @ lists . infradead . org,
	linux-block, Geert Uytterhoeven

On Fri, Dec 10, 2021 at 11:52:26AM -0700, Jens Axboe wrote:
> > Fixes: 1ebe2e5f9d68e94c ("block: remove GENHD_FL_EXT_DEVT")
> > Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

> 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.

It was tested in a tree that also contains the commit identified by the
Fixed tag, which is in the for-next tree but not the block-5.16 one.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
  2021-12-06  7:04 ` Christoph Hellwig
@ 2021-12-13 18:29   ` Jens Axboe
  -1 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-13 18:29 UTC (permalink / raw)
  To: Christoph Hellwig, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-block, Geert Uytterhoeven

On Mon, 6 Dec 2021 08:04:09 +0100, Christoph Hellwig 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.
> 
> 

Applied, thanks!

[1/1] mtd_blkdevs: don't scan partitions for plain mtdblock
      commit: 17f81f9d4b41d57e474975c3a5ca2a2c4c01e2ec

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock
@ 2021-12-13 18:29   ` Jens Axboe
  0 siblings, 0 replies; 14+ messages in thread
From: Jens Axboe @ 2021-12-13 18:29 UTC (permalink / raw)
  To: Christoph Hellwig, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-block, Geert Uytterhoeven

On Mon, 6 Dec 2021 08:04:09 +0100, Christoph Hellwig 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.
> 
> 

Applied, thanks!

[1/1] mtd_blkdevs: don't scan partitions for plain mtdblock
      commit: 17f81f9d4b41d57e474975c3a5ca2a2c4c01e2ec

Best regards,
-- 
Jens Axboe



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-12-13 18:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06  7:04 [PATCH] mtd_blkdevs: don't scan partitions for plain mtdblock Christoph Hellwig
2021-12-06  7:04 ` Christoph Hellwig
2021-12-06 16:47 ` Jens Axboe
2021-12-06 16:47   ` Jens Axboe
2021-12-10 18:52 ` Jens Axboe
2021-12-10 18:52   ` Jens Axboe
2021-12-12 10:02   ` Geert Uytterhoeven
2021-12-12 10:02     ` Geert Uytterhoeven
2021-12-12 19:19     ` Jens Axboe
2021-12-12 19:19       ` Jens Axboe
2021-12-13  7:26   ` Christoph Hellwig
2021-12-13  7:26     ` Christoph Hellwig
2021-12-13 18:29 ` Jens Axboe
2021-12-13 18:29   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.