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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D81B6FA3741 for ; Sat, 29 Oct 2022 00:27:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 53971850F4; Sat, 29 Oct 2022 02:27:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="NA1um7t6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 39758850E3; Sat, 29 Oct 2022 02:27:25 +0200 (CEST) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 91A6384EEF for ; Sat, 29 Oct 2022 02:27:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2e.google.com with SMTP id c8so5117492qvn.10 for ; Fri, 28 Oct 2022 17:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gHY5gGsRRB9f9LhYXuIwTuIo7evTHctrSF645+u45DY=; b=NA1um7t6Xsm6WMER+N6QP2xLR2erX1xnNo4VcfPEqtnkleoAWdJRdzcbCY4B0ovAwH jHNj+mCdkz5ZLaKmqcxbuSBPp1W0HWt8YaA5dZvYvi2GWHB1XE/DtzCF9fZ4ABJqeOa3 /E4nHMrlmXoY7RAksOOI71BYaBYuoAzHcIBhM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gHY5gGsRRB9f9LhYXuIwTuIo7evTHctrSF645+u45DY=; b=LU6O86zulIX99KahTwq7p/x0cPZ+PhCIHhQOQVv0GPWL0JvmFyTBVVCf5DDSONwyJL /PH47rGX8/uLT7XGvP4baj+OA3MpR9655CxWk+PpL8WYpDtq6MR7QEWT4uHO1BJWcWQz eytVzknM9jJeNrhJVLQ3xjL6uA6YloL75qTkIrlVD+BW2jEOYIS0+LjxSspl6Qj/V5Nk 82IOmyoLsvDsWsBl5gWOEGOua0OOGxA4K1+ekVOxbfqZOXVFZWmOp3xoHmoVJb9pyhCC uN7N0HNi1gD5pVJDbLIGTTKV5xcCXhUiSPtu4rzzValU0k1NCAATDLK/c5ic7EOSDJFT DX5w== X-Gm-Message-State: ACrzQf3EbAMUZaANfZ+aZ6PdFRRIAOSSHNFPK3KVdRQ0VdTNCkAzPGuO sRqlKqxlflNs44ugoxK420rWs8itpZo1qA== X-Google-Smtp-Source: AMsMyM6ybbG3MQQapqaZ/brB5M2YeTV9AOtexP/fgjB0Emh4YgzTNRKcEd2BDMsjRKYmve0qYSxQqA== X-Received: by 2002:a05:6214:f2a:b0:4bb:6721:9b84 with SMTP id iw10-20020a0562140f2a00b004bb67219b84mr1982275qvb.67.1667003239048; Fri, 28 Oct 2022 17:27:19 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-21a2-cb17-4547-06d4.res6.spectrum.com. [2603:6081:7b00:6400:21a2:cb17:4547:6d4]) by smtp.gmail.com with ESMTPSA id v7-20020a05622a144700b00398313f286dsm65130qtx.40.2022.10.28.17.27.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 17:27:18 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 06/21] fs: jffs2: Move SYS_JFFS2_SORT_FRAGMENTS to Kconfig Date: Fri, 28 Oct 2022 20:26:59 -0400 Message-Id: <20221029002714.1598153-6-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221029002714.1598153-1-trini@konsulko.com> References: <20221029002714.1598153-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Move the symbol SYS_JFFS2_SORT_FRAGMENTS to Kconfig and use the only remaining part of doc/README.JFFS2 that is still relevant and useful to the help for this option. Signed-off-by: Tom Rini --- doc/README.JFFS2 | 30 ------------------------------ fs/jffs2/Kconfig | 12 ++++++++++++ 2 files changed, 12 insertions(+), 30 deletions(-) delete mode 100644 doc/README.JFFS2 diff --git a/doc/README.JFFS2 b/doc/README.JFFS2 deleted file mode 100644 index fddefb174690..000000000000 --- a/doc/README.JFFS2 +++ /dev/null @@ -1,30 +0,0 @@ -JFFS2 options and usage. ------------------------ - -JFFS2 in U-Boot is a read only implementation of the file system in -Linux with the same name. To use JFFS2 define CONFIG_CMD_JFFS2. - -The module adds three new commands. -fsload - load binary file from a file system image -fsinfo - print information about file systems -ls - list files in a directory -chpart - change active partition - -If you do now need the commands, you can enable the filesystem separately -with CONFIG_FS_JFFS2 and call the jffs2 functions yourself. - -If you boot from a partition which is mounted writable, and you -update your boot environment by replacing single files on that -partition, you should also define CONFIG_SYS_JFFS2_SORT_FRAGMENTS. Scanning -the JFFS2 filesystem takes *much* longer with this feature, though. -Sorting is done while inserting into the fragment list, which is -more or less a bubble sort. That algorithm is known to be O(n^2), -thus you should really consider if you can avoid it! - ---- - -TODO. - - Remove the assumption that JFFS can dereference a pointer - into the disk. The current code do not work with memory holes - or hardware with a sliding window (PCMCIA). diff --git a/fs/jffs2/Kconfig b/fs/jffs2/Kconfig index 0e79c3409062..3bf01cd03137 100644 --- a/fs/jffs2/Kconfig +++ b/fs/jffs2/Kconfig @@ -17,3 +17,15 @@ config JFFS2_NAND depends on FS_JFFS2 help Enable support for NAND flash as the backing store for JFFS2. + +config SYS_JFFS2_SORT_FRAGMENTS + bool "Enable JFFS2 sorting of filesystem fragments (SLOW!)" + depends on FS_JFFS2 + help + If you boot from a partition which is mounted writable, and you + update your boot environment by replacing single files on that + partition, you should also define CONFIG_SYS_JFFS2_SORT_FRAGMENTS. + Scanning the JFFS2 filesystem takes *much* longer with this feature, + though. Sorting is done while inserting into the fragment list, + which is more or less a bubble sort. That algorithm is known to be + O(n^2), thus you should really consider if you can avoid it! -- 2.25.1