From patchwork Wed Jan 18 07:44:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 13105826 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5814C004D4 for ; Wed, 18 Jan 2023 08:15:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbjARIPr (ORCPT ); Wed, 18 Jan 2023 03:15:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbjARIOo (ORCPT ); Wed, 18 Jan 2023 03:14:44 -0500 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 166A5613CD for ; Tue, 17 Jan 2023 23:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1674027914; x=1705563914; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YrTatM5eucJi7UvlGSM81EVt6REo1JwZ+ahE2ONq6fY=; b=pV8WZvqqF9RjWJr5vzjwdglc7z6Zur7lzeeXYNwL2KdzNeuOAUeZAT41 gx0qFBMrf+bhMVIYLI7wiglRbzC+hNnQN6KZMS62V4hve9lghY/7QndcP R65AWv/gPD+P6O2FRmclqmmOrsq9WI20Zlfhm3wm7BfL3zypA5ByIAi1g FOHje3w5QLbuj5hFff9R+lOrmMGp1R6svj0TEKhwG2gC+oo4uLyz/NFvP Qb2kZPdvPGructrYtnE+qwR74PYJYVzcJNGcM3qo8X83w1FYdM0u/Y57U zw6WNtHSAoTASKppQaoSfo6AQsOeyGQPqLFzUjwPNkDBPgGTTwG3g2pri Q==; X-IronPort-AV: E=Sophos;i="5.97,224,1669046400"; d="scan'208";a="333108005" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Jan 2023 15:45:13 +0800 IronPort-SDR: /q81jTI/s3bimlhLD467V8YzzqV+a/CsOw/ZV81DCbjy5OpCw2kVjk1vUodRuSkHPzZxSjJRUq 1n8EpFiZSR3bEV42opGlCIJ08tRPclVt/1ckTzTZKp84UKVzIg+H4zQJ51Gfgr2fR9HMCgSk3A hMG4kx10cvUdCy4mppQAJCZ9ZtrXi4UglDTedx9EkcAtiz+7Jsgex2SJqezGAMGtiQP18Nwaf3 N4hdBuboPRrb0BNGMYSYjeg3liWGPmgNmLehzdHSA93RhWwnNAowE5ZuOtO6AokRhdx7eBW1pR F0c= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 17 Jan 2023 23:02:53 -0800 IronPort-SDR: ZIBjqOiWL9A1DNWZTwgk7mP2T9KWFOPgmW++ewewLbwV6FSHsTdHnfxC5Nx/nZeBpQJGyadgB3 d4b9kdGyhXQg7/Ks5BaR/3OFTcUk2FupsUiy/QEagaLRLIFKVKX87sEUUIBYMTwU/UqJ3hg3IZ +uBwGXDSwO9OQtzBV2nkwY7kaVeT06Jdtz3KZxi2zyr618LrrhVMvAoxEvkyPgtOB05Fu/AaFO zSBJ4zKUapjn8bsVgbDdcV9T6XhXz0u+lX/RQzVuW31pn7SjHJAMmS+ZGxki6iXCZSYlpNcWlL rr0= WDCIronportException: Internal Received: from f9rd9y2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.55.16]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jan 2023 23:45:13 -0800 From: Naohiro Aota To: linux-btrfs@vger.kernel.org Cc: Naohiro Aota Subject: [PATCH 1/3] btrfs-progs: docs: add per-space_info bg_reclaim_threshold entry Date: Wed, 18 Jan 2023 16:44:56 +0900 Message-Id: <20230118074458.2985005-2-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230118074458.2985005-1-naohiro.aota@wdc.com> References: <20230118074458.2985005-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org There are two "bg_reclaim_threshold" under the sysfs directory. One is at /sys/fs/btrfs// and sets the threshold to start the auto reclaim thread. The other one is at/sys/fs/btrfs//allocations/{data,metadata,system} and sets the threshold to reclaim a block group. These two options have the same name but they are calculated against different metrics. The former is a percentage of allocated (for a device extent) space on total device space, and the latter is a percentage of reclaimable space on a block group's zone capacity. Add description for per-space_info bg_reclaim_threshold to distinguish these two same name configurations. Signed-off-by: Naohiro Aota --- Documentation/ch-sysfs.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/ch-sysfs.rst b/Documentation/ch-sysfs.rst index 96fdaa34bff3..37fb49f945c7 100644 --- a/Documentation/ch-sysfs.rst +++ b/Documentation/ch-sysfs.rst @@ -29,7 +29,7 @@ Files in `/sys/fs/btrfs//` directory are: bg_reclaim_threshold (RW, since: 5.19) - Used space percentage to start auto block group claim. + Used space percentage of total device space to start auto block group claim. Mostly for zoned devices. checksum @@ -117,6 +117,14 @@ global_rsv_size Space info accounting for the 3 chunk types. Mostly for debug purposes. +Files in `/sys/fs/btrfs//allocations/{data,metadata,system}` directory are: + +bg_reclaim_threshold + (RW, since: 5.19) + + Reclaimable space percentage of block group's size (excluding permanently unusable space) to reclaim the block group. + Used for zoned devices. + Files in `/sys/fs/btrfs//devinfo/` directory are: error_stats: From patchwork Wed Jan 18 07:44:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 13105828 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0FF3C32793 for ; Wed, 18 Jan 2023 08:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbjARIQK (ORCPT ); Wed, 18 Jan 2023 03:16:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbjARIOp (ORCPT ); Wed, 18 Jan 2023 03:14:45 -0500 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3C2E4617C for ; Tue, 17 Jan 2023 23:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1674027921; x=1705563921; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2ZcczTb9SvDtk/IvTr++eIdtO+FHPYiC6lDOjk6G/j4=; b=cWJ1hoHWc1uvGhO0B6bAjqxzNxOSIMTDLKWiLNFyvb+TYr86aRnFo3eK Z1c9mdj0ghsJ84Nbqupd7KFrg6Yg0zYxZ57LOvABoFkp13rBoDxULI17l a8mLpxUmkSKDkpCIxUyS4hd7RWjeahINNWltftoloXXy3f7alC9kpJgE+ kwYAyKGsDonW4Yj5wthcZK2ynWLnIiON6hnXP8vSLU3hHB4gKnCeFCe1K zyhhidrhFbAsTTnLXhEgs4bDMFpFO35OrffkB/viiGiU9UFyoyab347fT H+RUSQAxiUGzqdhTc0UfBnUzqcllqmbnek914Takhai8pyCSU1m3ZBDlJ g==; X-IronPort-AV: E=Sophos;i="5.97,224,1669046400"; d="scan'208";a="333108006" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Jan 2023 15:45:13 +0800 IronPort-SDR: dnujUgabXZmwNSghG1FP++S/AvTRi88n4UqdGA/j3q9iUJyapTZY0sBiU3LlCZpKsjiPU7KaUl jqvSFYDZPgC5viz8FgO1VBZ9XBR6qUEGBqaX1P+Ty0j/SrpVl7i36C97lRhsPT9dLQ3yqxdLSp q4+YOmMrT0yYTVRlcruvL1mqYXykcAsN8r4OOKEw1xKzx4TRgzPzqNbsAjOqQzjcl0vfbW5Q4P clfxQm1zawPsbn7r6bBRgppZEtNgToB7IZ9tqZxLo2LVPnSRHlxUZy1q7jsu1W9OwLGnk2RtBP QUk= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 17 Jan 2023 23:02:54 -0800 IronPort-SDR: CeO9XqmE1mAa0WD0Mfc2m3MLkoCxJVGKw3OQcOM+h4W4lXu+alNgCtcB36Z+Xsju0Ay6qk4fbC WFeZncvw6ZCuOoPe6J9xW6GbV5JvJ64QfUPR4iY7pT5ztOSS6kSKm7z43KO7XWGG2QsJB8jC5U DWRY7nsdSIB0/x+Ru/6Gky2Ely4vXho+lkc5tHi7MQBSzFjmlccEexxGwkhtRmjwEIRR8MA56T UOmmlVHIfUZ+veKJn0CFWz2n7R9qz1DbrsjwW7/iMChphcVn+DgC9IqNmVdKjV/b7LalhkeOJh nXc= WDCIronportException: Internal Received: from f9rd9y2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.55.16]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jan 2023 23:45:14 -0800 From: Naohiro Aota To: linux-btrfs@vger.kernel.org Cc: Naohiro Aota Subject: [PATCH 2/3] btrfs-progs: docs: fix nodesize typo Date: Wed, 18 Jan 2023 16:44:57 +0900 Message-Id: <20230118074458.2985005-3-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230118074458.2985005-1-naohiro.aota@wdc.com> References: <20230118074458.2985005-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Fix the typo. Signed-off-by: Naohiro Aota --- Documentation/ch-sysfs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ch-sysfs.rst b/Documentation/ch-sysfs.rst index 37fb49f945c7..569879aadf27 100644 --- a/Documentation/ch-sysfs.rst +++ b/Documentation/ch-sysfs.rst @@ -75,7 +75,7 @@ metadata_uuid Shows the metadata uuid of the mounted filesystem. Check `metadata_uuid` feature for more details. -nodeisze +nodesize (RO, since: 3.14) Show the nodesize of the mounted filesystem. From patchwork Wed Jan 18 07:44:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Aota X-Patchwork-Id: 13105827 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97968C004D4 for ; Wed, 18 Jan 2023 08:16:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbjARIPz (ORCPT ); Wed, 18 Jan 2023 03:15:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbjARIOp (ORCPT ); Wed, 18 Jan 2023 03:14:45 -0500 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D3446D50 for ; Tue, 17 Jan 2023 23:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1674027921; x=1705563921; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6d3remRzgneLCz3PW+1IHV5PpOOnfVDPnU5Hwxy3mRY=; b=eibrHYVPxoyGF3F1e5ea5hd0QxPcNdbarXFM2S6kH3jEKjKAwI2/6bYy d6BxZRZlh2q+vnBqeKeFkqKxpmJiI9C3XhYnf6YfjhnAAB1gDgatqiHap m105AZcqtErEtZy3rmCuyYQk0itDm0LO6COGJDyjUORyTHlbLR4GBGX+b aLgz2KPoM964bo+RCPUvLewz9U2/gAuOWKYV3W7CW2GY6Belb1XBz1oAJ yHzMA3DqKmvkEkpfBHSIDcW+se40w3KSmRb/dstnycYx4cfu4uohDVOU0 eKAlelPwggxVs/tEjMQ0RIBi7IV/uIM2z3TH/fQ652EENcwaw/kaMOkXJ Q==; X-IronPort-AV: E=Sophos;i="5.97,224,1669046400"; d="scan'208";a="333108007" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Jan 2023 15:45:14 +0800 IronPort-SDR: QMZYZ0X0OF85y5SpNvF6E6lsRsHut8NQ/zfdyRzfGMz4ZxT+Lc2hgM0q9AxrXHR0Vr7FNdy1Wn qhlrziOsz7yzwZKIHlj26dXJ9cErxS4PBS/+Vk1znWI5FE3yQQQffpFVUf8IcgM7XyaPl/PLY4 t89MKmZbtSFVeIl7jHDjVN7PFFjUCoURjS7w8WrdZwC13hRRKf8s4xDSf7ok9KuVIWeRKWOtjG DQyPEtCQvsPP0QBELfKf1N8Q+YlX3rlYKhpvSAMyJipZK19NjXB1kAo5/Jn8ENGtl6T4dD9Cjd dqM= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 17 Jan 2023 23:02:55 -0800 IronPort-SDR: fCLZWrrhgC1aUkP0xSKhgrRemND0z6RH8l9kS0BpLepofmF+XA6RS3w47HYusK9tO3QXUqTHxp BvosNVcu9xlqOwZCMH49KKKlJujWnEN+FV2xwSgxHUa7Jd+TfoSRo9VeNPTNXTh2LTRc3qu7DI 9uilrhiWVzQo6VxnTsfq8/zuG0A7S4T74ck9HcJ3l9vEW+boBtCuQ/O8Sz8ub2pLvillubeE5S XJ+X2Wl/s8Z7Iplz4SYNReQwnM6I+jJxnPzBZUY6QhOcPmdoD9FC6rvpAgC/CWAqhjuHH39Ny5 03g= WDCIronportException: Internal Received: from f9rd9y2.ad.shared (HELO naota-xeon.wdc.com) ([10.225.55.16]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jan 2023 23:45:14 -0800 From: Naohiro Aota To: linux-btrfs@vger.kernel.org Cc: Naohiro Aota Subject: [PATCH 3/3] btrfs-progs: docs: add chunk_size description Date: Wed, 18 Jan 2023 16:44:58 +0900 Message-Id: <20230118074458.2985005-4-naohiro.aota@wdc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230118074458.2985005-1-naohiro.aota@wdc.com> References: <20230118074458.2985005-1-naohiro.aota@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Add description for /sys/fs/btrfs//allocation//chunk_size. Signed-off-by: Naohiro Aota --- Documentation/ch-sysfs.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/ch-sysfs.rst b/Documentation/ch-sysfs.rst index 569879aadf27..09e409a41aa5 100644 --- a/Documentation/ch-sysfs.rst +++ b/Documentation/ch-sysfs.rst @@ -125,6 +125,12 @@ bg_reclaim_threshold Reclaimable space percentage of block group's size (excluding permanently unusable space) to reclaim the block group. Used for zoned devices. +chunk_size + (RW, since: 6.0) + + Shows the chunk size. Can be changed for data and metadata. + Cannot be set for zoned devices. + Files in `/sys/fs/btrfs//devinfo/` directory are: error_stats: