Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3836075ybz; Mon, 4 May 2020 10:34:59 -0700 (PDT) X-Google-Smtp-Source: APiQypIwQKRu1TjAKpS64Mr9AhpjNz9vHkI1EjW0j2oljy7yc1Egw8lUl+pyuiA140KU8bPTUeqN X-Received: by 2002:a05:6402:6d5:: with SMTP id n21mr16021089edy.82.1588613699401; Mon, 04 May 2020 10:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588613699; cv=none; d=google.com; s=arc-20160816; b=MhsbYNt0h4iImgWqjKLylcVOfWOBM4yaui+ZGgmjv0Fy0JYRxYPb9uuGNYVKqYdGJc xndZ5NYRzxT+vaT6pRBv0+SALrX5DX5TSMPLqEPhuLsacSuXILqYTnGKj0kG4Bh7/gT6 ZY6u00qzJPcL3RbVH4JgpzgxM8TQ/OIQrYO/dWOG3thzYiEkN1jxcNDGcy3edO36e2aM qxB8imH6P5/DcbSrbDS1q3dcyWHBSXLgiW3gwQnvDbZEbb7ioGLOjrktSEBRFAiYgE0n nZLafPJ+fjzcKN1m4Bn4OkVxb9RjJRMBXvE4R3a0v8JrrS7XMqkjOosEvIKzlvyclZaK sYPg== 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=MIEekZjomI+V12+YgwvTCGXmmNA0TxFLMs5bHdrqSIY=; b=NXPo1CGDfCGx39uQO3EopbD9VwlYScvhTHWkddCqpMnit7ntXv6yLfkh/hFvi7JY2m yKzVRPypp9/hlK8unuzREA6gq0AcqDIEoD/vp3BZDPeDqDjsTOIn2LtxVJWKReVqehW1 VUvk6HKtvyyyKHCi5TjWkRLALsg3vb62istzqhEg44FaEU8/7jRe46U0/44d8NB+gKj4 ZAZLeY1MCl5jJBCYMXEleitLN8TbPOpbjiSotyL3pbmJoTgdmVPoN70F+Lhubw/qbq2M dCPGYf2bpNQlVXEJpOT0pE1lwcBw5ymm9sdL/THujibTqbhSRyPuwhvZ+MepIK/oc9Jm mbVg== 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 z9si7602453ejr.264.2020.05.04.10.34.35; Mon, 04 May 2020 10:34:59 -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 S1730061AbgEDRat convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 May 2020 13:30:49 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:47693 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729597AbgEDRas (ORCPT ); Mon, 4 May 2020 13:30:48 -0400 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id EFDA2100009; Mon, 4 May 2020 17:29:37 +0000 (UTC) Date: Mon, 4 May 2020 19:29:36 +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: <20200504192936.2973c3bf@xps13> In-Reply-To: References: <20191021193343.41320-1-kdasu.kdev@gmail.com> <20191105200344.1e8c3eab@xps13> <1718371158.75883.1572995022606.JavaMail.zimbra@nod.at> <20200109160352.6080e1e5@xps13> <20200109182807.04c8866a@xps13> <20200502200806.1d6b1cba@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, Kamal Dasu wrote on Mon, 4 May 2020 11:20:16 -0400: > On Sat, May 2, 2020 at 2:08 PM Miquel Raynal wrote: > > > > 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) > > > > So I should only set master->oops_panic_write with the new code ?. Yes, if you can still reproduce the issue and it solves your problem, then it's I think a nice fix. Thanks, Miquèl