[PATCH] mtd: set mtd partition panic write flag

Kamal Dasu kdasu.kdev at gmail.com
Mon Nov 11 12:35:59 PST 2019


Richard,

On Tue, Nov 5, 2019 at 6:03 PM Richard Weinberger <richard at nod.at> wrote:
>
> ----- Ursprüngliche Mail -----
> > Von: "Miquel Raynal" <miquel.raynal at bootlin.com>
> > An: "Kamal Dasu" <kdasu.kdev at gmail.com>
> > CC: "linux-mtd" <linux-mtd at lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list at broadcom.com>,
> > "linux-kernel" <linux-kernel at vger.kernel.org>, "David Woodhouse" <dwmw2 at infradead.org>, "Brian Norris"
> > <computersforpeace at gmail.com>, "Marek Vasut" <marek.vasut at gmail.com>, "richard" <richard at nod.at>, "Vignesh Raghavendra"
> > <vigneshr at ti.com>
> > Gesendet: Dienstag, 5. November 2019 20:03:44
> > Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
>
> > Hi Kamal,
> >
> > Richard, something to look into below :)
>
> I'm still recovering from a bad cold. So my brain is not fully working ;)

Thanks for reviewing this. Hope you are feeling better now.

>
> > Kamal Dasu <kdasu.kdev at gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> > -0400:
> >
> >> Check mtd panic write flag and set the mtd partition panic
> >> write flag so that low level drivers can use it to take
> >> required action to ensure oops data gets written to assigned
> >> mtd partition.
> >
> > I feel there is something wrong with the current implementation
> > regarding partitions but I am not sure this is the right fix. Is this
> > something you detected with some kind of static checker or did you
> > actually experience an issue?
> >
> > In the commit log you say "check mtd (I suppose you mean the
> > master) panic write flag and set the mtd partition panic write flag"
> > which makes sense, but in reality my understanding is that you do the
> > opposite: you check mtd->oops_panic_write which is the partitions'
> > structure, and set part->parent->oops_panic_write which is the master's
> > flag.
>
> IIUC the problem happens when you run mtdoops on a mtd partition.
> The the flag is only set for the partition instead for the master.
>
> So the right fix would be setting the parent's oops_panic_write in

How do I get access to the parts parent in the core ?. Maybe I am
missing something.

> mtd_panic_write().
> Then we don't have to touch mtdpart.c
>
> Thanks,
> //richard



More information about the linux-mtd mailing list