From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-bw0-f49.google.com ([209.85.214.49]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PHEgC-0004p4-RU for linux-mtd@lists.infradead.org; Sat, 13 Nov 2010 11:54:01 +0000 Received: by bwz5 with SMTP id 5so3971234bwz.36 for ; Sat, 13 Nov 2010 03:53:59 -0800 (PST) Subject: Re: [PATCH v2 09/10] mtd-utils: nandwrite: full 64-bit support w/ libmtd From: Artem Bityutskiy To: Brian Norris In-Reply-To: <1289457554-24155-1-git-send-email-computersforpeace@gmail.com> References: <1289457554-24155-1-git-send-email-computersforpeace@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Sat, 13 Nov 2010 13:53:47 +0200 Message-ID: <1289649227.2218.40.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: David Woodhouse , linux-mtd@lists.infradead.org, Mike Frysinger Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2010-11-10 at 22:39 -0800, Brian Norris wrote: > Several ioctls are replaced with libmtd calls which should give us 64-bit > support for large devices. libmtd mostly provides drop-in replacements > for the functionality we need. However, when we require erasure of a > badly-written block, mtd_erase() only erases a single block, whereas > MEMERASE could erase a larger region. In nandwrite, we may have a "virtual > blocksize" of more than one (when blockalign > 1). Thus, I added a loop > for this case. You could as well just introduce another libmtd helper - would be cleaner, IMO. -- Best Regards, Artem Bityutskiy (Артём Битюцкий)