Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1817121rdh; Sat, 25 Nov 2023 04:18:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeEjP0KyMnVxtvIvsY+BEEnTKKLPkaSrqeaE4ga+rg6BZTh84JJACE6eOZH+yA+VZRgPb4 X-Received: by 2002:a05:6808:f90:b0:3b2:e9ab:68e2 with SMTP id o16-20020a0568080f9000b003b2e9ab68e2mr8163385oiw.7.1700914709053; Sat, 25 Nov 2023 04:18:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700914709; cv=none; d=google.com; s=arc-20160816; b=PxygojD0Bt7l5DpTz3CwXyBBhQNuogdTQClmJ0mAj15dNLYycuwC4MSAJHEDKbqQEP 8oPf+MwOjK4yU0sWJIiZExHEYv+FOkpvdHAa71xWPLLKpcv/bvDnZ5iNa44TbkY6V+/i Az3IlLxkgkTNynbqImj3PX9lhGcW0aqk86LmIagYh5X4g1REE1eoHtl9RsKSVGlddRIw aQhN408wM6vnlY7lkVc70cdnxKoGDJ+rJhxBExPR2bK77uWLShEWPJpje4oJ8jt3fySX nlrLt6C7g5mEPg2fhcWnFsBtbqxY3rAWT+r2hgrzXuRrWGZxkzXsCH9UcfKvYUhlwuC/ hszQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=oj7NcbAoO6WJHd3cU8EYoc2CPY3Ts1ouS8wfqR+W0Ls=; fh=Uq/HK0tePPZ4uFSrjmAoQ+8fm8HBRKIYZPcFTEYnhm4=; b=Q81RBioRi4ejKKnxqGjtzZNjKGyVvLEpuoIYG+0S0kccKbxzqgXJ+4nHM41htHnXVc YDiL34i82yNwrbieYFZJfjDrIJggjYcw1nOgCqMghzfEExMus7rrYANA/n5tOrvlCtAH 0n/WS1SAenCa1KuyE2qbdM999oO2l5FIz7T4uiRfilYKfRJ1+vADYGdtQGeR76QgYEbH kPa/Ya5ylVRSV7ID8yAcNVDfCUOP3SHtqxBAztcjsjDeqhCd+YhbA2tDiE85bMRxZOC0 jpB4yacVZQYBpykH68DlABEQlOZE+toOP441lr9o387Ilx8ArejHMLtQNu+2+ziw0fOY UZYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-160-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6-20020a056214202600b0066d1a12e3d3si6362169qvf.108.2023.11.25.04.18.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 04:18:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-160-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C35611C20D1C for ; Sat, 25 Nov 2023 12:18:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5C3EFBED; Sat, 25 Nov 2023 12:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42558D6 for ; Sat, 25 Nov 2023 04:18:18 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4ScrTx4Dk8z4f3jrf for ; Sat, 25 Nov 2023 20:18:13 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 61D371A01D1 for ; Sat, 25 Nov 2023 20:18:15 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgDX2hD_5WFlJE6YBw--.43741S4; Sat, 25 Nov 2023 20:18:15 +0800 (CST) From: Zhang Yi To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: [PATCH 1/2] jbd2: correct the printing of write_flags in jbd2_write_superblock() Date: Sat, 25 Nov 2023 20:17:38 +0800 Message-Id: <20231125121740.1035816-1-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgDX2hD_5WFlJE6YBw--.43741S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Xw18ZFWUGry8CF1fuF4xCrg_yoWfXFX_WF s2vrn7uwnxXr1Ykws5u3WUurna9r4xuF48G34xKwsxXF4UJFyrKFs8Xryqqry3Wa4vgrW3 Cws2vFW8trZ5XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbz8FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCF04k20xvY0x0EwIxG rwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4 vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IY x2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26c xKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x02 67AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjfUF9a9DUUUU X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ From: Zhang Yi The write_flags print in the trace of jbd2_write_superblock() is not real, so move the modification before the trace. Signed-off-by: Zhang Yi --- fs/jbd2/journal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 30dec2bd2ecc..e7aa47a02d4d 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1791,9 +1791,11 @@ static int jbd2_write_superblock(journal_t *journal, blk_opf_t write_flags) return -EIO; } - trace_jbd2_write_superblock(journal, write_flags); if (!(journal->j_flags & JBD2_BARRIER)) write_flags &= ~(REQ_FUA | REQ_PREFLUSH); + + trace_jbd2_write_superblock(journal, write_flags); + if (buffer_write_io_error(bh)) { /* * Oh, dear. A previous attempt to write the journal -- 2.39.2