Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2339936ybl; Thu, 9 Jan 2020 11:01:31 -0800 (PST) X-Google-Smtp-Source: APXvYqziTiSWpu9Hb7JhR7MTfMsqrP1wIAKSlvUPCLyk5uKCLnZOK1hGfgxfAt0CEEtuAc+i/3mn X-Received: by 2002:a9d:24e8:: with SMTP id z95mr9810777ota.5.1578596491614; Thu, 09 Jan 2020 11:01:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578596491; cv=none; d=google.com; s=arc-20160816; b=1BeZDZdtmcfJwovzxxbeiTHdTNdgMZXRBTALXnXSO534GxkFPhpBfXE/eTS8yECx/K r140mUfiN0Ve1w3PUHwvJeqB18Rnj7+3+UC/91R4lEKTgEJJ+x+cz8Ai3/snFuCDK18h IREDmTWJJGN8Yy4M8wQDuMO/Jmh6SDkLwBg4tm9k9iAZXOGnUCgH4gjYu64aumsMN8lZ RGOwlHTwx8mHInXwmpqDt0EGaR4lHrK3UA0acQw6vGjKlX9hGBXtFfDzQR9bNR9eKYLo I0qc0IUsSfQxaURu/Ibjzyg620H0t9DRSpNgURKuc08iLACZ1sN2HXNd5sivTjfZPf1K 15lg== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Ns8pyLdZWaR7EY0G9VgXXruzwtefBBW8uhWRDHlrT3I=; b=xH2EMx7ixnSjrQZhhYsbxiwaGXp3upBZ3IBctG2VKGm6hAgWkKQdaEmhNZ1GqlZWDk 7qCNRuvJR7hHBGNmYRlo8a2lUESj+pChxiuGmZDUwXC+4LGF3e70X+KfUYjdu++5+w+t ARgtcnjWKNpfZIcqh6LIFCIZvsSa/RkuISlnAUM3X+ZoQWFogiP26ePGbE/8oEXiP29x z0b4ucGQ+97TH9euwAx0mCKwp6i+0cofhYAzwR95LxOkq7OpDJb3F/Q6ZuZo2YUMO6Qx LRDT0XpA8gah2VdxCMp6Nz6C6fKhENTw/+0cNUIgan2f2CHavykxIMGVURGcs8xKxkaX UFLA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s128si4044807oig.204.2020.01.09.11.01.16; Thu, 09 Jan 2020 11:01:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730858AbgAIPD4 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 9 Jan 2020 10:03:56 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:34135 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727980AbgAIPD4 (ORCPT ); Thu, 9 Jan 2020 10:03:56 -0500 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 38014200005; Thu, 9 Jan 2020 15:03:53 +0000 (UTC) Date: Thu, 9 Jan 2020 16:03:52 +0100 From: Miquel Raynal To: Richard Weinberger Cc: Kamal Dasu , linux-mtd , bcm-kernel-feedback-list , linux-kernel , David Woodhouse , Brian Norris , Marek Vasut , Vignesh Raghavendra Subject: Re: [PATCH] mtd: set mtd partition panic write flag Message-ID: <20200109160352.6080e1e5@xps13> In-Reply-To: <1718371158.75883.1572995022606.JavaMail.zimbra@nod.at> References: <20191021193343.41320-1-kdasu.kdev@gmail.com> <20191105200344.1e8c3eab@xps13> <1718371158.75883.1572995022606.JavaMail.zimbra@nod.at> Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Richard Weinberger wrote on Wed, 6 Nov 2019 00:03:42 +0100 (CET): > ----- Ursprüngliche Mail ----- > > Von: "Miquel Raynal" > > An: "Kamal Dasu" > > CC: "linux-mtd" , "bcm-kernel-feedback-list" , > > "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 ;) > > > 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 > mtd_panic_write(). > Then we don't have to touch mtdpart.c > This issue is still open, right? Kamal can you send an updated version? Thanks, Miquèl