From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xb3s7-0006NU-0g for linux-mtd@lists.infradead.org; Mon, 06 Oct 2014 08:42:24 +0000 Received: by mail-pa0-f53.google.com with SMTP id kq14so4969046pab.12 for ; Mon, 06 Oct 2014 01:42:01 -0700 (PDT) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: Block numbers of BEB From: Woody Wu Date: Mon, 06 Oct 2014 15:41:53 +0700 To: Ricard Wanderlof Message-ID: <22ddcb2d-d790-4e3e-af60-6bae0465295a@email.android.com> Cc: Richard Weinberger , "linux-mtd@lists.infradead.org" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On October 6, 2014 2:53:01 PM GMT+07:00, Ricard Wanderlof wrote: > >On Sun, 5 Oct 2014, Woody Wu wrote: > >> What I said of checking /proc is wrong. What I indeed checked was >> /sys/class/ubi as you mentioned. The problem is, under the >> /sys/class/ubi, there is no information about what blocks are marked >as >> bad, there is only information about the total number of bad blocks. > >I was thinking the mtd tool nanddump displayed which blocks were bad >when >dumping, but a quick test just now revealed that that doesn't seem to >be >the case. > >The information is available to userspace though, so it's fairly easy >to >hack together a userspace tool that gets the bad block information via >ioctls. Do you know in what kernel .c file that contain the information? Is it in mtd or ubi? > >/Ricard -- sent from mobile