Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6662996ybx; Mon, 11 Nov 2019 12:37:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzenptXUXXjHWegJqfmQcQS/AuprAp0na/+E3J26rgK4sBDq1UmIrxhRBkvWvoVAilJjhLT X-Received: by 2002:aa7:d6d1:: with SMTP id x17mr26060501edr.158.1573504634179; Mon, 11 Nov 2019 12:37:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573504634; cv=none; d=google.com; s=arc-20160816; b=jTcBZSTfFRfXsVi/Qu4TcdMX6ymIK4T8RDvdgRbfq9rKbQU/0SOmyLkxvl8CzvoUC/ SBk67rJqxWCWFA5BmjADUmL9tXO/21SSsJp/aNvMEWbW3j1v1nrVzg5C7VrjICPvG5hr AML4zQpu6WT5OgbrPXj0GTjfi4CVIke7EECXPcu+4Y/tT9/ySB6piNbSuoCzhvWa7mwy ZEEP7Sr3zrs3/gmIrmLcZEZKNMxxPdODJ1Ukei3JHjC3FhOdDiJTvOJYesLUEElX2ZcK S6Ux50mgx2wMAofW8HZzRJY7gWsQ5gdUmPtxR6bO0+A29hhf/qsjyfIqSoZfyFQm8LLr LrEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=RhwkYq4Xoz6qbJxRjALfE8MZM5xtYEgYwlSWURLNNtQ=; b=Zi6hHZizaXum8iIZVhKgLTK1EqLu2f0uM4LPikguhMxvbYokciO2r19nWVvAgRzKs3 RW5SptGKeuiX32sluToSv4yOvkewl9VY40CkYAsev62C5WlgUrOVDzhIy3V3TNhzEGTK lDK0Ia7mqVOftFFgwgMZQ+28p4VVkDfPqTkSE9mDn66ccShrjJrFdDJK1McA8CL6E0Kb 73ztRTh2cLWAyFWkAqiovce9OPyIC5taNIAEy03wb2RdFoiwrUVlWjh421HxW/+c7wcc AO5IatrOc36m98wgTnTn3A5f37ahf6dFbkn3RcV0kssbushioKc6a9qKDZAisTE7TNrl 1mWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B9HpL7Sh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24si10802310edv.239.2019.11.11.12.36.50; Mon, 11 Nov 2019 12:37:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B9HpL7Sh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbfKKUgL (ORCPT + 99 others); Mon, 11 Nov 2019 15:36:11 -0500 Received: from mail-il1-f196.google.com ([209.85.166.196]:41074 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbfKKUgK (ORCPT ); Mon, 11 Nov 2019 15:36:10 -0500 Received: by mail-il1-f196.google.com with SMTP id q15so8197601ils.8 for ; Mon, 11 Nov 2019 12:36:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RhwkYq4Xoz6qbJxRjALfE8MZM5xtYEgYwlSWURLNNtQ=; b=B9HpL7ShmycybCbB/KdQWKQzEjjgaaa2GSg05G+IyWGcNoKGdgq+i3AiZZCpkls2rS gWMgTexeJ+B4g7hN2MsYpn0sfu/aBgzJ6zU7levUDZ604CgComvqjicKfg73ofP3OH25 9ycCPobwBCJUpzAIFobC/0KchLKnUC7Z6IiPn2X8cpZQ/YAbllHMWVb/3AMBcBaf4KoW dScRXQubsprrYmMAUXK6/M3tTpcYw7KrdK55qvc1kEfnPqYpfwtGm1Vm/W2RlRZstHAo R7Y38IjXOHk9FgG6h87nYylUA5Q04K6tz486W2iWPF60eTVLBAjh/3o1o4P8F0lQR7mt mjSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RhwkYq4Xoz6qbJxRjALfE8MZM5xtYEgYwlSWURLNNtQ=; b=A/LQ2NNxlkDET8Bv9qBSFfOnKWgXbld0NWYfNZy47frHWtmIFX9iXFGaexdp4yAYgq joWKubQ0rIonrEq9KCFVk1JK/2cKUqpCyCGNW3jlAARfb5EPL9A1hhn+nlBI38FDr9T+ s8jXBndeSx+vXLB6Wj2sLFrbMFW7R1eWh+KfOSMvyUx9N6GDbosxfFimCzmkYKcwQ3Lf FlcVFL2l3hOvQrsCu40yhmLFeUJU1M9d3GzSg8RcdC3tBX7tAtuN1Vdb7+3EZRyjPSU9 LMCiywRBs0SfOhR5OPf9E4HOoNAPqs8dTlHOkooRK11kjgvZJ1t7qfLep96oQl/VIUSV /uqQ== X-Gm-Message-State: APjAAAXgtMHowZvooHE9KipBhtgV0fuLiDl7Vlu5zmSqjInUZGC8YYuq Mx6KKkmra5yuGAlEsAhP0U4mEdqGIoS7mbu5D5A= X-Received: by 2002:a92:7786:: with SMTP id s128mr33173924ilc.204.1573504569865; Mon, 11 Nov 2019 12:36:09 -0800 (PST) MIME-Version: 1.0 References: <20191021193343.41320-1-kdasu.kdev@gmail.com> <20191105200344.1e8c3eab@xps13> <1718371158.75883.1572995022606.JavaMail.zimbra@nod.at> In-Reply-To: <1718371158.75883.1572995022606.JavaMail.zimbra@nod.at> From: Kamal Dasu Date: Mon, 11 Nov 2019 15:35:59 -0500 Message-ID: Subject: Re: [PATCH] mtd: set mtd partition panic write flag To: Richard Weinberger Cc: Miquel Raynal , linux-mtd , bcm-kernel-feedback-list , linux-kernel , David Woodhouse , Brian Norris , Marek Vasut , Vignesh Raghavendra Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Richard, On Tue, Nov 5, 2019 at 6:03 PM Richard Weinberger wrote: > > ----- Urspr=C3=BCngliche Mail ----- > > Von: "Miquel Raynal" > > An: "Kamal Dasu" > > CC: "linux-mtd" , "bcm-kernel-feedback-l= ist" , > > "linux-kernel" , "David Woodhouse" , "Brian Norris" > > , "Marek Vasut" , "= richard" , "Vignesh Raghavendra" > > > > 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 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