From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.nokia.com ([192.100.122.233] helo=mgw-mx06.nokia.com) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1Llzif-0003YK-B4 for linux-mtd@lists.infradead.org; Tue, 24 Mar 2009 06:02:44 +0000 Subject: Re: [PATCH] flash_eraseall: only add cleanmarkers on known flashtypes From: Artem Bityutskiy To: Sebastian Andrzej Siewior In-Reply-To: <1237848138-18157-3-git-send-email-sebastian@breakpoint.cc> References: <1237848138-18157-1-git-send-email-sebastian@breakpoint.cc> <1237848138-18157-3-git-send-email-sebastian@breakpoint.cc> Content-Type: text/plain; charset="UTF-8" Date: Tue, 24 Mar 2009 08:02:16 +0200 Message-Id: <1237874536.14602.93.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: linux-mtd@lists.infradead.org Reply-To: dedekind@infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2009-03-23 at 23:42 +0100, Sebastian Andrzej Siewior wrote: > + switch (meminfo->type) { > + case MTD_ROM: > + case MTD_RAM: > + case MTD_NORFLASH: > cleanmarker.totlen = cpu_to_je32(sizeof(struct > jffs2_unknown_node)); > - else { > - struct nand_oobinfo oobinfo; > + break; > + > + case MTD_DATAFLASH: > + case MTD_UBIVOLUME: > + fprintf(stderr, "JFFS2 layout not supported on this > flash.\n"); > + return -1; > + break; This should also include MLC NAND flash. To make you nice patches even better you should call MEMGETOOBSEL ioctl in case of NAND and check if there is really enough bytes for clean-marker. But I guess you do not have to do this. -- Best regards, Artem Bityutskiy (Битюцкий Артём)