Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2842654rdh; Mon, 30 Oct 2023 09:10:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEelKr29/o/ymCStG6FPh6ihHtEn0fjbd/2dOfjv1nwWhTYxEcYBnodaryvC9FLnEMK771 X-Received: by 2002:a05:6a00:1493:b0:6b7:e577:3f7b with SMTP id v19-20020a056a00149300b006b7e5773f7bmr9080918pfu.21.1698682207660; Mon, 30 Oct 2023 09:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698682207; cv=none; d=google.com; s=arc-20160816; b=UKQ6/HeykdHjjOLaDmS1aEhs6NQpR+096H8DK098XG5GUcd5/hNYSzO8NmJTn+s7VK FOP8a3uDo7MyOsmuxxP3Ecva7CUAKZvzL0el/mPr2h/fCHLChVlHH2meyLwfC3LsB8Rq gTIC/PSSMNA66nHkjyxkEBpk7xA/Y+yh5ptJJqccXqW9/W0g+VyQZF8qYdcxqzeW8B0Y qW7may5LVMe6LO+HMWkhoJYoSxr9fjDfHaRAHUV1ocLWwGenU0fphc2Ef6ZZxbXIOTWJ LTI4CbK5h0oVKl3KdBwqDoE07yGpnIV/B1WZbZ6q76yicjNC9gCeRMxqmkG35laxq4tS 4SHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-hdrordr :ironport-data:dkim-signature; bh=JbLjDaSQ/MMEbG7NqsjFo5ez6xpX5dx/0mlbkJdTCtI=; fh=/Isf/zz0UX22O5MZ/YBkv3dPXbeKprtj270gDmEqicM=; b=qIxoR6OI5AQcIW7cLEkQUgVtVz9KHJvM5LsIdTEoRWfykxarfq7KVC5K10G7hWPtbp Rgk+W3bpQiMi58L0bUbdsu5yTKHoRMyAGqj3PAWB3H5u8RMCe/g7D47JP5G6GzLRkm/v hck8eMKraUKpvfO1jNJHGXI0Ico/7M/JL3BWpCrww/mmv+akf8PNi223johXVzx2pubu aMbO5AhnYzdSLj4wJhk3F4N7NEBaoGCnvDbuovFSr6LfoVZIad7STuijrrlnu+0Kmq5z D8qRQdYoZZXEL4JlflkwJBYXH7GBVmm0IcvxM15VHGtfI63HpiUTivqPmXJu2O0x9MXW Dosg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b="a/wY+Z2r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=cisco.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g22-20020a056a001a1600b006bd8c5a3b52si5029533pfv.110.2023.10.30.09.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 09:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b="a/wY+Z2r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=cisco.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0A1BA805B05B; Mon, 30 Oct 2023 09:10:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233803AbjJ3QJy (ORCPT + 99 others); Mon, 30 Oct 2023 12:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233798AbjJ3QJx (ORCPT ); Mon, 30 Oct 2023 12:09:53 -0400 Received: from aer-iport-7.cisco.com (aer-iport-7.cisco.com [173.38.203.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E29CDE4; Mon, 30 Oct 2023 09:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3699; q=dns/txt; s=iport; t=1698682190; x=1699891790; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=eNnoMQ4I7acQaTIEyjdpFkNmCGqvwkumfmLfUlT8veM=; b=a/wY+Z2rZJqafXwQC6lcdsaqwRWKQNGnGajtzM79g1c/CYVjk4pfU3Dr wrbLj0Cnc/wpXrZeKsXmp+J6xGXvRmL+0xexqowRKLWv8RW80MJGSKg6z YOKdUBtqCJJRQj+WR3RqD4ph4UgXMXHtRrd3EVYKvpz2tp+QFBmpBjd7T 0=; X-CSE-ConnectionGUID: W+MC8d5QRbySLYisNsXQ0A== X-CSE-MsgGUID: YO8MyPrtRzmES2iiCX6qSg== X-IPAS-Result: =?us-ascii?q?A0BhAQCd1D9llxbLJq1aHgEBCxIMQIFEC4QILhJIjU6IY?= =?us-ascii?q?gOSWYslgSUDVg8BAQENAQFEBAEBgXIBgxMChx0nNAkOAQIEAQEBAQMCAwEBA?= =?us-ascii?q?QEBAQECAQEFAQEBAgEHBBQBAQEBAQEBATcFEDWFdYZMAQEBAQIBOj8FCwsYL?= =?us-ascii?q?lcGEwiCdoI8IwOoCHiBNIEBsyeBaIFIiAoBigZCgUlEhD8+hBuGSSIEhmQog?= =?us-ascii?q?V0HDi4HMoEKDAmBA4J6NSmMQF4iR3AbAwcDWCsQKwcEMBsHBgkWGBUlBlECA?= =?us-ascii?q?i0kCRMSPgSBZYFRCoEDPw8OEYJDIgIHNjYZSyuCMAkVDDRNdhAqBBQXgREEa?= =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cQwc2 BiDoTJ7hq0Ul9JO0aynu1vGmDmr4JPOS2bZ+zk7QEqarSZSNIL4Xrai+GP/3PdbCp2pdwGo6 S1sd9el0MgCCpSElSqoSeoLHa206/vtDNE6qQMwd3XG32n9k0NPbby88xkjfhw3Y5ZslSvBP RWK41I5CIp7ZiPCUENhX26mI+IOpUQKPf3hU/3OY5J1fpF9HONs1Hg1PBP4M4zFvkwhj6Y7M JGXGftA7Er264w6klJapM9Ej9fHIxzSI0uIHPgXKDz9iNKjiIa9E+ttDbd3RrlRAFm4iAvU6 c1DEMCB1g9SVubzCgGOr99DcwhWdyNqXcivwyCySgJlClc3cI3GI6GJqY7Nh6Q+90iovr6Sp yrkChMwJKTX3COZeW1mlUyPmJu2Dcog8hrXzAQnPE2j3DA4cJ2z4aIEH6bbjpF5nNGPOcVcF qFfE+3ZW6wnYm2eq1wggWzV8dUKmOKD3lnVYUJIoVEXIvZdeuA+0oa/IFaxpHFQUHHfWAlXi +TI6z43iKErH2xKZPs6otr2p79tlRDxQN5PYnY= IronPort-HdrOrdr: A9a23:k2JGs68EPoC4SKKXMdFuk+D3I+orL9Y04lQ7vn2ZhyY7TiW9rb HKoB17726XtN9/YhsdcLy7VZVoBEmskaKdgrNhXotKPjOGhILAFugLhrcKgQeBJ8SUzIBgPM lbH5RWOZnZEUV6gcHm4AOxDtoshOWc/LvAv5a485+oJjsaEp2JKGxCe2CmLnE= X-Talos-CUID: 9a23:9J8qTm78pVasIq/H5tssyw0xMZApL0TnxmbrB365EkByeITNYArF X-Talos-MUID: =?us-ascii?q?9a23=3Akd9TgQ0VcDwxSmcw6v+5g72qBTUj0oP+LVE1i4k?= =?us-ascii?q?8qcypDnZxOhyt0i2MTdpy?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.03,263,1694736000"; d="scan'208";a="10110212" Received: from aer-iport-nat.cisco.com (HELO aer-core-6.cisco.com) ([173.38.203.22]) by aer-iport-7.cisco.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 16:09:46 +0000 Received: from localhost (ams3-vpn-dhcp2135.cisco.com [10.61.72.87]) (authenticated bits=0) by aer-core-6.cisco.com (8.15.2/8.15.2) with ESMTPSA id 39UG9jo8022939 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Oct 2023 16:09:46 GMT Date: Mon, 30 Oct 2023 18:09:45 +0200 From: Ariel Miculas To: Phillip Lougher Cc: linux-doc@vger.kernel.org, Andrew Morton , serge@hallyn.com, Jonathan Corbet , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] docs: filesystems: document the squashfs specific mount options Message-ID: References: <20231029161924.50648-1-amiculas@cisco.com> <46d308b2-5e59-862d-b429-e6ee418bc61e@squashfs.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46d308b2-5e59-862d-b429-e6ee418bc61e@squashfs.org.uk> X-Authenticated-User: amiculas@cisco.com X-Outbound-SMTP-Client: 10.61.72.87, ams3-vpn-dhcp2135.cisco.com X-Outbound-Node: aer-core-6.cisco.com X-Spam-Status: No, score=-8.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 30 Oct 2023 09:10:05 -0700 (PDT) On 23/10/30 03:40PM, Phillip Lougher wrote: > On 30/10/2023 12:57, Ariel Miculas wrote: > > On 23/10/29 08:33PM, Phillip Lougher wrote: > > > On 29/10/2023 16:19, Ariel Miculas wrote: > > > > When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set, the "threads" mount option > > > > can be used to specify the decompression mode: single-threaded, > > > > multi-threaded, percpu or the number of threads used for decompression. > > > > When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set and > > > > SQUASHFS_DECOMP_MULTI is set, the "threads" option can also be used to > > > > specify the number of threads used for decompression. This mount option > > > > is only mentioned in fs/squashfs/Kconfig, which makes it difficult to > > > > find. > > > > > > > > Another mount option available is "errors", which can be configured to > > > > panic the kernel when squashfs errors are encountered. > > > > > > > > Add both these options to the squashfs documentation, making them more > > > > noticeable. > > > > > > > > Signed-off-by: Ariel Miculas > > > > > > Looks good to me. > > > > > > Reviewed-by: Phillip Lougher > > > > Unfortunately, it seems this is not quite correct either: > > There is the config option SQUASHFS_MOUNT_DECOMP_THREADS: > > ``` > > bool "Add the mount parameter 'threads=' for squashfs" > > depends on SQUASHFS > > depends on SQUASHFS_DECOMP_MULTI > > default n > > help > > Use threads= to set the decompression parallel mode and the number of threads. > > If SQUASHFS_CHOICE_DECOMP_BY_MOUNT=y > > threads= > > else > > threads=<2|3|...> > > The upper limit is num_online_cpus() * 2. > > ``` > > that depends on SQUASHFS_DECOMP_MULTI. > > So I think I should take my v1 patch and specify that the "threads=" > > mount option depends on SQUASHFS_MOUNT_DECOMP_THREADS. There's no need > > to specify SQUASHFS_DECOMP_MULTI, because SQUASHFS_MOUNT_DECOMP_THREADS > > already depends on it. > > Sorry, you have to specify SQUASHFS_DECOMP_MULTI to be able to specify > SQUASHFS_MOUNT_DECOMP_THREADS if SQUASHFS_DECOMP_BY_MOUNT is unselected. Agree. > > Just try it, do make menuconfig, ensure SQUASHFS_CHOICE_DECOMP_BY_MOUNT > is unselected, select Single threaded decompression and you won't be > able to specify SQUASHFS_MOUNT_DECOMP_THREADS. True. > > That was the point of my review. What bit don't you understand? But SQUASHFS_DECOMP_MULTI is not enough, you need to specify SQUASHFS_MOUNT_DECOMP_THREADS in order to use the "threads=" mount option. So instead of saying ``` If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is **not** set and SQUASHFS_DECOMP_MULTI is set: ``` wouldn't it be right to actually say: ``` If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is **not** set and SQUASHFS_MOUNT_DECOMP_THREADS is set: ```? As you've mentioned, you could only set SQUASHFS_MOUNT_DECOMP_THREADS when SQUASHFS_DECOMP_MULTI is selected. That happens in two cases: * either SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set, in which case it also selects SQUASHFS_MOUNT_DECOMP_THREADS * either SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set, SQUASHFS_DECOMP_MULTI is set and SQUASHFS_MOUNT_DECOMP_THREADS is also set So I wouldn't even mention SQUASHFS_DECOMP_MULTI in the documentation, only SQUASHFS_MOUNT_DECOMP_THREADS, because the latter always depends on the former. And the "threads=" mount option is only available when SQUASHFS_MOUNT_DECOMP_THREADS is set (which is the configuration I've missed in v1 and v2). Regards, Ariel > > Phillip > > > What do you think? > > > > Regards, > > Ariel > > >