From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dADp2-0000Mz-QO for linux-mtd@lists.infradead.org; Mon, 15 May 2017 11:05:54 +0000 Date: Mon, 15 May 2017 13:05:20 +0200 From: Boris Brezillon To: Richard Weinberger Cc: "Mario J. Rugiero" , Marek Vasut , Cyrille Pitchen , Brian Norris , David Woodhouse , linux-mtd@lists.infradead.org Subject: Re: [PATCH v3] mtd: nand: add option to erase NAND blocks even if detected as bad. Message-ID: <20170515130520.6ffff277@bbrezillon> In-Reply-To: References: <20170512053957.10426-1-mrugiero@gmail.com> <20170512073946.812-1-mrugiero@gmail.com> <20170515102158.798f83f2@bbrezillon> <20170515114159.655309cf@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 15 May 2017 12:10:58 +0200 Richard Weinberger wrote: > Boris, > > Am 15.05.2017 um 11:41 schrieb Boris Brezillon: > >> IMHO we can keept it simple such as: > >> echo y > /sys/kernel/debug/nand//allow-bad-block-erase > >> > >> Then a user can erase whatever he wants... > > > > Well, I was proposing to do that because several users can use the same > > NAND chip in parallel, and allowing to forcibly erase a bad block at > > the NAND chip level can be dangerous in this case. > > Here is a real example: 2 users are accessing 2 different partitions, > > one wants to force bad block erasure on partition 1, while the other > > just wants to normally erase partition 0. With the global > > "allow/disallow bad block erasure" approach, you're just likely to > > erase bad blocks in partition 0 as well. > > Hmm, I'm not sure whether it makes sense to be smart in this case. > If somebody needs to fixup his bad blocks, like Mario described, there > are no other users and such an action should only be done when you > really know what you are doing. > This is a debug knob and not a knob that should be used in production > or while other parts of the chip are in use. Fair enough. Let's keep it simple then.