From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RlppT-00035X-HD for linux-mtd@lists.infradead.org; Fri, 13 Jan 2012 22:42:36 +0000 Received: by eeke50 with SMTP id e50so401961eek.36 for ; Fri, 13 Jan 2012 14:42:33 -0800 (PST) Subject: Re: [PATCH v3 3/6] mtd: nand: erase block before marking bad From: Artem Bityutskiy To: Brian Norris Date: Sat, 14 Jan 2012 00:42:30 +0200 In-Reply-To: <1326140612-26323-4-git-send-email-computersforpeace@gmail.com> References: <1326140612-26323-1-git-send-email-computersforpeace@gmail.com> <1326140612-26323-4-git-send-email-computersforpeace@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Message-ID: <1326494553.2258.38.camel@koala> Mime-Version: 1.0 Cc: Dan Carpenter , Kulikov Vasiliy , Sebastian Andrzej Siewior , Nicolas Ferre , Dominik Brodowski , Peter Wippich , Gabor Juhos , linux-mtd@lists.infradead.org, Jonas Gorski , Jamie Iles , Ivan Djelic , Robert Jarzmik , David Woodhouse , Maxim Levitsky , Dmitry Eremin-Solenikov , Kevin Cernekee , Barry Song <21cnbao@gmail.com>, Jim Quinlan , Andres Salomon , Axel Lin , Anatolij Gustschin , Mike Frysinger , Arnd Bergmann , Lei Wen , Sascha Hauer , Artem Bityutskiy , Florian Fainelli , Adrian Hunter , Matthieu CASTET , Kyungmin Park , Shmulik Ladkani , Wolfram Sang , Chuanxiao Dong , Joe Perches , Guillaume LECERF , Roman Tereshonkov Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2012-01-09 at 12:23 -0800, Brian Norris wrote: > Many NAND flash systems (especially those with MLC NAND) cannot be > reliably written twice in a row. For instance, when marking a bad block, > the block may already have data written to it, and so we should attempt > to erase the block before writing a bad block marker to its OOB region. > > We can ignore erase failures, since the block may be bad such that it > cannot be erased properly; we still attempt to write zeros to its spare > area. > > Note that the erase must be performed before the BBT is updated, since > otherwise, nand_erase_nand() would not allow us to erase our "bad > block." > > Signed-off-by: Brian Norris This looks like an independent patch to me, is that right? If yes, you can send it separately. Artem.