From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93107CA0EE4 for ; Thu, 14 Aug 2025 14:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Subject:References: In-Reply-To:Message-ID:Cc:To:From:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XMy81x+CtV3WU5cP4vcKSRLe7RkVV3dpWpxshVGPzuQ=; b=tf0hYV0wIDt2svtqpqUTF1yzkV avYinW5Rl7eeytSSq/fC/dCh5OXQl3mfu+V1u2tg3WA4YS49fMtHmAYLV57JjbzR0sOL9fW2bMsAf kCXNpz0V9GXSTvHjZ5i0i26Tccq2vLl5LP4AAEZSw+bRe4KDdsrTlgpkmg0soRCqd9dF0UGuV1+BS OD9XZnDh5/A87ddSp8pUwipPAU0m9ciJ4lt/VkrmqQ3Zay7jPIepvb1YSUoktDNokym56Ps7f9Jx6 uqL6i/q2SuJd/e5RyWlQBxaoEgr6MSOXuU6zfrmgZU6b6t5b7n1YUAafDrFiyw4iy9LjNn8U9NFQu dc3NUCeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1umYzM-0000000HGWz-2vJT; Thu, 14 Aug 2025 14:31:32 +0000 Received: from mailout.nod.at ([116.203.167.152] helo=lithops.sigma-star.at) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1umWA5-0000000GkOl-3PGn for linux-mtd@lists.infradead.org; Thu, 14 Aug 2025 11:30:27 +0000 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C38D32FFDA5; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id XP9eaYOi19Kn; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 33BBC2FFDA9; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OGe52fzWuMNR; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id E51A62FFDA5; Thu, 14 Aug 2025 13:30:13 +0200 (CEST) Date: Thu, 14 Aug 2025 13:30:13 +0200 (CEST) From: Richard Weinberger To: Cheng Ming Lin Cc: chengzhihao1 , Miquel Raynal , Vignesh Raghavendra , linux-mtd , linux-kernel , Alvin Zhou , leoyu , Cheng Ming Lin Message-ID: <608935583.115196.1755171013804.JavaMail.zimbra@nod.at> In-Reply-To: References: <20250812051949.983040-1-linchengming884@gmail.com> <152133202.103367.1754981828821.JavaMail.zimbra@nod.at> Subject: Re: [RFC] mtd: ubi: skip programming unused bits in ubi headers MIME-Version: 1.0 X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF141 (Linux)/8.8.12_GA_3809) Thread-Topic: skip programming unused bits in ubi headers Thread-Index: 63S535GLvQTJB7IX1iFPElc1JTBAaQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250814_043025_991207_575BFF74 X-CRM114-Status: UNSURE ( 5.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org LS0tLS0gVXJzcHLDvG5nbGljaGUgTWFpbCAtLS0tLQo+IFZvbjogIkNoZW5nIE1pbmcgTGluIiA8 bGluY2hlbmdtaW5nODg0QGdtYWlsLmNvbT4KPj4gSSBoYXZlIGJlZW4gdG9sZCB0aGF0IHdyaXRp bmcgMHhGRiBieXRlcyB0byBOQU5EIHNob3VsZCBiZSBhdm9pZGVkLgo+PiBUaGlzIGlzIGFsc28g d2h5IFVCSSBpbml0aWFsaXplcyB0aGVtIHRvIDB4MDAuCj4gCj4gTm9ybWFsbHksIGFmdGVyIGEg TkFORCBmbGFzaCBibG9jayBpcyBlcmFzZWQsIGFsbCBiaXRzIGFyZSBpbiB0aGUgMHhGRgo+IHN0 YXRlLiBQcm9ncmFtbWluZyAweEZGIGluIHRoaXMgY2FzZSB3aWxsIG5vdCBhY3R1YWxseSBjaGFu Z2UgdGhlIE5BTkQKPiBjZWxscywgYXMgdGhlIGRldmljZSBjYW4gaW5oaWJpdCBwcm9ncmFtbWlu Z+KAlGVpdGhlciBieSByYWlzaW5nIHRoZQo+IGJpdGxpbmUgdm9sdGFnZSBvciB1c2luZyBhIHNl bGYtYm9vc3RlZCBwcm9ncmFtIGluaGliaXQgbWVjaGFuaXNtLgo+IFRoZXJlZm9yZSwgcHJvZ3Jh bW1pbmcgMHhGRiBpcyBhIG5vcm1hbCBhbmQgaGFybWxlc3Mgb3BlcmF0aW9uIGZvciBOQU5ECj4g Zmxhc2guCgpUaGF0J3MgdGhlIGNydWNpYWwgcXVlc3Rpb24uIElzIHRoaXMgdHJ1ZSBmb3IgYWxs IE5BTkQgY2hpcHM/CkRvIGF2b2lkIGxhcmdlciB3cml0ZXMgb2YgMHhGRiBwYXR0ZXJucyBmaWxl IHN5c3RlbXMgc3VjaCBhcyBVQklGUwphbHNvIHVzZSBjb21wcmVzc2lvbiBhIGxvdC4KQXQgbGVh c3QgdGhhdCdzIHdoYXQgSSBoYXZlIGJlZW4gdG9sZCB3aGVuIEkgYXNrZWQgMTArIHllYXJzIGFn bwpob3cgVUJJIHdvcmtzLgoKVGhhbmtzLAovL3JpY2hhcmQKCgpfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTGludXggTVREIGRpc2N1c3Npb24g bWFpbGluZyBsaXN0Cmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8v bGludXgtbXRkLwo= From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lithops.sigma-star.at (mailout.nod.at [116.203.167.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA11215DBC1 for ; Thu, 14 Aug 2025 11:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.167.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755171026; cv=none; b=Nr128JwZdLq9DikVarVB8jkM1ZMd0MC6SCbJn4SRd9KJjoh3mQLLE1bhwhHajtGizk+4j3EcXch5E0SqYqoMP+WB0nE1y65WUPNnV4YEYKbVYsVEKhDnkeleycMWHPz+7npDa+++gXewOH8aFz6xNH9cNtcZOni/3p7WrVyqJ5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755171026; c=relaxed/simple; bh=nBdT1pcEgLIrsOU0sL7E2tMUtUwI2vNgiHfyZmMtLOs=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=MvatgU7m22idiwtSLvpWK4iVcc4Lh6tzmF1E+qfhsndj7od7PoBsapFS17BitAub0kjVTjC1Jf+H0ZvJ4BffgxyvyjSZ2RYnqHW5+F4YzWUn50SMTz9U5ddMs/gYSViFpv2/TUD1ujUK9lLQkaYo/xTvI9TmGfP07xuJo6AocuY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at; spf=fail smtp.mailfrom=nod.at; arc=none smtp.client-ip=116.203.167.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nod.at Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C38D32FFDA5; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id XP9eaYOi19Kn; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 33BBC2FFDA9; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OGe52fzWuMNR; Thu, 14 Aug 2025 13:30:14 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id E51A62FFDA5; Thu, 14 Aug 2025 13:30:13 +0200 (CEST) Date: Thu, 14 Aug 2025 13:30:13 +0200 (CEST) From: Richard Weinberger To: Cheng Ming Lin Cc: chengzhihao1 , Miquel Raynal , Vignesh Raghavendra , linux-mtd , linux-kernel , Alvin Zhou , leoyu , Cheng Ming Lin Message-ID: <608935583.115196.1755171013804.JavaMail.zimbra@nod.at> In-Reply-To: References: <20250812051949.983040-1-linchengming884@gmail.com> <152133202.103367.1754981828821.JavaMail.zimbra@nod.at> Subject: Re: [RFC] mtd: ubi: skip programming unused bits in ubi headers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF141 (Linux)/8.8.12_GA_3809) Thread-Topic: skip programming unused bits in ubi headers Thread-Index: 63S535GLvQTJB7IX1iFPElc1JTBAaQ== ----- Urspr=C3=BCngliche Mail ----- > Von: "Cheng Ming Lin" >> I have been told that writing 0xFF bytes to NAND should be avoided. >> This is also why UBI initializes them to 0x00. >=20 > Normally, after a NAND flash block is erased, all bits are in the 0xFF > state. Programming 0xFF in this case will not actually change the NAND > cells, as the device can inhibit programming=E2=80=94either by raising th= e > bitline voltage or using a self-boosted program inhibit mechanism. > Therefore, programming 0xFF is a normal and harmless operation for NAND > flash. That's the crucial question. Is this true for all NAND chips? Do avoid larger writes of 0xFF patterns file systems such as UBIFS also use compression a lot. At least that's what I have been told when I asked 10+ years ago how UBI works. Thanks, //richard