Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1936682ybz; Sat, 2 May 2020 11:10:05 -0700 (PDT) X-Google-Smtp-Source: APiQypJSK+IVIZRyROKCVeeiOj5ae+oJe23L19OXdnyccHYQEHeJSqjwTUpB+WjflYouGSO913Y3 X-Received: by 2002:a50:f058:: with SMTP id u24mr7895017edl.171.1588443005503; Sat, 02 May 2020 11:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588443005; cv=none; d=google.com; s=arc-20160816; b=EMPIfmruE+rbPljxdrjs0AAiAYQb0hvxp98MXr1S0gIP0OrbFr68xFrHZ3oeaB+T/w 1IgL0C1eHmpBf/5mE4mQwD1PLBA+XFnto+XYYdpHOoEV6r7njKJZdmSE2+fosl65bjdo JnzxZbSAL3Mtsx+S2AkMLp2F9iX6Ugb/HRurkekoL6EyHcywabFKz1T/aqevYwcwGWRC DDCRL1/zAVoOWmrGqJ1HktQ8MIJYWziKZtVzqAEokmgXbXJGoD2mWplZCI1icm2gRbCu hVIK4klXMwuvE9hiMyVMh5mItTktIW4YdX2gEQhyAY6bzUim+/T8JN1QAUgK+doa4FVV zJFQ== 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=XrhwPi3y7a4TrWHl5VT8QxwwyRutsk+iXAyaBM+b3xQ=; b=I9Jf7+NoeXbW4Oan0hu46xWISdNnI9CEsjhIdfIbTLTDIOuKKs9x4v8xWhGTVtBxZe FLT4I3mr6COnBGsDsoyBbRs+ja5eDxdSYXKrIDWXkzYgdCHlU9tqo9Ob5YFytbUBDsVF mbyXG3LrDixSuP+yaiBH3kgaSrRKAHaWhB8s6InbyEkhONGr9Kg5oALKqKWd5rIdk8z8 1oluUideEyH0/9HuGXxP9ul6Q5mZApZIPX1Er2j6EoXEimU2iISJ9kl7pDLbgm2BVkQo P8O28FiM2f4RrPq/ENHJPAFEdN+lrVNFpmBN4kQiNIp2Z/LE5mbZKTpE7uyWNmJvc4uA oC1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si3718428edr.298.2020.05.02.11.09.42; Sat, 02 May 2020 11:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728226AbgEBSIK convert rfc822-to-8bit (ORCPT + 99 others); Sat, 2 May 2020 14:08:10 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:36369 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727997AbgEBSIJ (ORCPT ); Sat, 2 May 2020 14:08:09 -0400 X-Originating-IP: 91.224.148.103 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 52B56C0005; Sat, 2 May 2020 18:08:07 +0000 (UTC) Date: Sat, 2 May 2020 20:08:06 +0200 From: Miquel Raynal To: Kamal Dasu Cc: Vignesh Raghavendra , Kamal Dasu , Richard Weinberger , linux-kernel , Marek Vasut , bcm-kernel-feedback-list , linux-mtd , Brian Norris , David Woodhouse Subject: Re: [PATCH] mtd: set mtd partition panic write flag Message-ID: <20200502200806.1d6b1cba@xps13> In-Reply-To: <20200109182807.04c8866a@xps13> References: <20191021193343.41320-1-kdasu.kdev@gmail.com> <20191105200344.1e8c3eab@xps13> <1718371158.75883.1572995022606.JavaMail.zimbra@nod.at> <20200109160352.6080e1e5@xps13> <20200109182807.04c8866a@xps13> 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 Hi Kamal, Miquel Raynal wrote on Thu, 9 Jan 2020 18:28:07 +0100: > Hi Kamal, > > Kamal Dasu wrote on Thu, 9 Jan 2020 10:25:59 > -0500: > > > Miquel, > > > > Yes the issue is still open. I was trying to understand the suggestion > > and did not get a reply on the question I had > > > > Richard wrote : > > "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" > > > > How do I get access to the parts parent in the core ?. Maybe I am > > missing something. > > I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition). > > Would this help? > > https://www.spinics.net/lists/linux-mtd/msg10454.html I'm pinging you here as well, as I think you raise a real issue, and we agreed on a solution, which can now be easily setup with the above change which has been applied and support for functions like: static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd) static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs) static inline bool mtd_is_partition(const struct mtd_info *mtd) static inline bool mtd_has_partitions(const struct mtd_info *mtd) Thanks, Miquèl