Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3038594rwa; Mon, 22 Aug 2022 19:55:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR42rCyx0wMgp2jDpUwyAZv24GrTmotapQ18irEBugQXUBq+m//fc7av5dpIaOM6j+NO1u1f X-Received: by 2002:a05:6402:716:b0:446:2a40:9138 with SMTP id w22-20020a056402071600b004462a409138mr1694704edx.82.1661223321200; Mon, 22 Aug 2022 19:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661223321; cv=none; d=google.com; s=arc-20160816; b=nHnPAeHiFQd1AbGUOaVFYYqTHqEWNg9oE1/gm3oan0p0Stv6vRPEdUmId8JFXa5sDh ZsLHz+V+lj7Uzl9c6DFnHgVhb8OnL6zUxSAn557mDV8BHEyGEUwiQeRKAHNRZvNiQIiz KkJzNWUyvmguiAQykwK9rLKDgFBVP8zEcxbAYIelzH8wMjlrMLtbafOYmeqvP0d0gp4C uJEE+g/0xS9W/4yiXTSA5Jb6Z92SZaxlqGOHd3vCo8bUIS3TyvwBE7xf8F/SgAPMAnPk yG3GxyM5d1JgMnWe/bxaOaNqmJHO7OGECSzypdt/4kHvwFirUi7mEgZwsLHx0hp4q2UG aF5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VcjBrx5NcRDcCtos/TPNCVqfav4qyE7ow6dAU7IPv8M=; b=q/ubrUY8a+TmmKAK2dz0Zz9vIQMbRE2OZ+uBhjHOrXlpjdqWQ/1d/sqtzBWqrJlhc9 YQcD9SX3iKABZJNOi8ORytgih4ad/0bZg5MudLxGGMXdRxMvjqJ7zTJBtznG7nZ9hVMg dISz5nWBe1ragSttXBAnxSQhckxu/DBMTHMnGYx395eqFVfq//dxsF5j+OAG/F8WcK4o 1x6wy6HFQ0XuqkEa7oeURHBgs0yfeLT7U85I8R0nV3JuxMIx/ZXmCGFuID9ZcewptLi2 oiDWN/OpsgXTDS7exfDvD5QBCRBRo1L+y8Ti3CNRz7Fs3f9jUgaoborzWulbURrYg97X KIxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=a4S5z2YV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa14-20020a1709076d0e00b007316843d58bsi10804671ejc.925.2022.08.22.19.54.55; Mon, 22 Aug 2022 19:55:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=a4S5z2YV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239463AbiHWCIx (ORCPT + 99 others); Mon, 22 Aug 2022 22:08:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232437AbiHWCIn (ORCPT ); Mon, 22 Aug 2022 22:08:43 -0400 X-Greylist: delayed 1871 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 22 Aug 2022 19:08:40 PDT Received: from m15113.mail.126.com (m15113.mail.126.com [220.181.15.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 69D3F33A10; Mon, 22 Aug 2022 19:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=VcjBr x5NcRDcCtos/TPNCVqfav4qyE7ow6dAU7IPv8M=; b=a4S5z2YVX3o9E+XpAyh6Y 68/5o/XbgsAlg7PsdMjogmE2/RqIQTsHiUC2kinOmuesKZDbPToW86DQ4hzVpC5y KVGUtfATz0iJJrhAbhSq6aAS/r5VD3uRoUksaY0SBTe+hIQt7MetuN+t3akDk1no wi7w+fVS7sxC+5tzjNw1Gs= Received: from fedora.. (unknown [123.52.27.102]) by smtp3 (Coremail) with SMTP id DcmowAC33o49LwRj8lDqAQ--.42709S2; Tue, 23 Aug 2022 09:37:02 +0800 (CST) From: zhaomzhao@126.com To: djwong@kernel.org, corbet@lwn.net Cc: linux-xfs@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Zhao Mengmeng Subject: [PATCH v1] Documentation: filesystems: xfs: update pseudocode and typo fixes Date: Mon, 22 Aug 2022 21:36:53 -0400 Message-Id: <20220823013653.203469-1-zhaomzhao@126.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: DcmowAC33o49LwRj8lDqAQ--.42709S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxXF18WrW3CryrCFWDWr48Zwb_yoWrAw1Upr Za9r1rJw1kJry8Ars2qw45XryF9anYqrWUGrWqy3s3Zws8K3Zayr13tr1Y9F1kXr4ru3WY vr1j9rn8Za47Ca7anT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jplk3UUUUU= X-Originating-IP: [123.52.27.102] X-CM-SenderInfo: 52kd0zp2kd0qqrswhudrp/1tbijB9md1pEJE5iSwAAsf X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhao Mengmeng According to the implementation of xfs_trans_roll(), it calls xfs_trans_reserve(), which reserves not only log space, but also free disk blocks. In short, the "transaction stuff". So change xfs_log_reserve() to xfs_trans_reserve(). Besides, fix several typo issues. Signed-off-by: Zhao Mengmeng --- .../filesystems/xfs-delayed-logging-design.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/filesystems/xfs-delayed-logging-design.rst b/Documentation/filesystems/xfs-delayed-logging-design.rst index 4ef419f54663..02b32030bab3 100644 --- a/Documentation/filesystems/xfs-delayed-logging-design.rst +++ b/Documentation/filesystems/xfs-delayed-logging-design.rst @@ -100,7 +100,7 @@ transactions together:: ntp = xfs_trans_dup(tp); xfs_trans_commit(tp); - xfs_log_reserve(ntp); + xfs_trans_reserve(ntp); This results in a series of "rolling transactions" where the inode is locked across the entire chain of transactions. Hence while this series of rolling @@ -191,7 +191,7 @@ transaction rolling mechanism to re-reserve space on every transaction roll. We know from the implementation of the permanent transactions how many transaction rolls are likely for the common modifications that need to be made. -For example, and inode allocation is typically two transactions - one to +For example, an inode allocation is typically two transactions - one to physically allocate a free inode chunk on disk, and another to allocate an inode from an inode chunk that has free inodes in it. Hence for an inode allocation transaction, we might set the reservation log count to a value of 2 to indicate @@ -200,7 +200,7 @@ chain. Each time a permanent transaction rolls, it consumes an entire unit reservation. Hence when the permanent transaction is first allocated, the log space -reservation is increases from a single unit reservation to multiple unit +reservation is increased from a single unit reservation to multiple unit reservations. That multiple is defined by the reservation log count, and this means we can roll the transaction multiple times before we have to re-reserve log space when we roll the transaction. This ensures that the common @@ -259,7 +259,7 @@ the next transaction in the sequeunce, but we have none remaining. We cannot sleep during the transaction commit process waiting for new log space to become available, as we may end up on the end of the FIFO queue and the items we have locked while we sleep could end up pinning the tail of the log before there is -enough free space in the log to fulfil all of the pending reservations and +enough free space in the log to fulfill all of the pending reservations and then wake up transaction commit in progress. To take a new reservation without sleeping requires us to be able to take a @@ -615,7 +615,7 @@ those changes into the current checkpoint context. We then initialise a new context and attach that to the CIL for aggregation of new transactions. This allows us to unlock the CIL immediately after transfer of all the -committed items and effectively allow new transactions to be issued while we +committed items and effectively allows new transactions to be issued while we are formatting the checkpoint into the log. It also allows concurrent checkpoints to be written into the log buffers in the case of log force heavy workloads, just like the existing transaction commit code does. This, however, @@ -886,7 +886,7 @@ can be multiple outstanding checkpoint contexts, we can still see elevated pin counts, but as each checkpoint completes the pin count will retain the correct value according to it's context. -Just to make matters more slightly more complex, this checkpoint level context +Just to make matters slightly more complex, this checkpoint level context for the pin count means that the pinning of an item must take place under the CIL commit/flush lock. If we pin the object outside this lock, we cannot guarantee which context the pin count is associated with. This is because of -- 2.37.1