From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from a.ns.miles-group.at ([95.130.255.143] helo=radon.swed.at) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ztt3C-0001l2-W0 for linux-mtd@lists.infradead.org; Wed, 04 Nov 2015 08:04:12 +0000 Subject: Re: master node can not be recovered To: =?UTF-8?B?QmVhbiBIdW8g6ZyN5paM5paMIChiZWFuaHVvKQ==?= , "dedekind1@gmail.com" , "linux-mtd@lists.infradead.org" References: <5637934D.5000503@nod.at> <1446541937.6126.125.camel@gmail.com> From: Richard Weinberger Message-ID: <5639BBDE.5000604@nod.at> Date: Wed, 4 Nov 2015 09:03:42 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Am 04.11.2015 um 08:43 schrieb Bean Huo 霍斌斌 (beanhuo): > >> On Mon, 2015-11-02 at 17:46 +0100, Richard Weinberger wrote: >>> ubifs_recover_master_node() is very strict. >> >> Just like the rest of the recovery code, the master node part is consistent with >> that. >> >>> Can it be that in your case more than the last written page is >>> corrupted? >> >> I suspect so too. > > Hi, Artem > The second master node not be corrupted. I will test again later, and send it out. UBIFS uses two LEBs to store master nodes. If UBIFS was interrupted (unclean reboot) while writing a master node it will double check whether only this last written page is corrupted and then copy the node from the second LEB. But if two or more pages are corrupted UBIFS will give up as this most not happen from UBIFS's point of view. Thanks, //richard