Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4514847rdh; Wed, 29 Nov 2023 03:48:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4N5h1PZFq159nEfIKGYQZBhALvKgDwNdmi+8M8NirB/f3E/rBs3nxizt6SolUHCe1aCBh X-Received: by 2002:a05:620a:8e16:b0:771:31c:adcb with SMTP id re22-20020a05620a8e1600b00771031cadcbmr15079867qkn.7.1701258524782; Wed, 29 Nov 2023 03:48:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701258524; cv=none; d=google.com; s=arc-20160816; b=p9znKp49oo5c+Xy3yKTjcsPBBogrs/BGFmmKwT4nLSVqrm2XaXcY29MqNY3Rg5Norr 7Cp0X/nMntIBpK9zqJ+j+eNioXkxoxX5bfEXoRKKFZngFDPGlssXPtjA8hbnOz/05OtL +bZ0TFqIQzi8+wlOSsQ1c9ovQU6xQmW0YDRVWhft5/ekMPSeqdwpHnEH7Y/Zk4vs093D jKuUwfz8kQYLPjXRXG/xl57cq9J6OOm1ftBYIZwK5OMT4iIRpzqII/LN4n3HK6zq0Zdq e+OON0G1/E8acA4Ega6Wnww4CQdYaCxD/2H5DL/Bc5r+5Q2Adi3SD9RbefnxcqSyHvry WKvA== 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=K+zHCHdlHlluU2E8K2Gj8LgRN7fQk+TWrz1Khuo8igg=; fh=Uq/HK0tePPZ4uFSrjmAoQ+8fm8HBRKIYZPcFTEYnhm4=; b=bk487IKiIJGkCYZi1M1xMsIoaJfiBpyRjt//3qRgEGzPME9TmZhJ3MI5f9OvuNXdeH N8qnCTl1ysR1u84Knrd/+fZE8ye7qyyzb9sZaaK3SLOJYtHaihpa0oFoCjKbIFgS1qlc 4EdwqJ+QyGTEdZ9C6yzGmVhUBbOR7Qfl4t0GmsdFkdBlwmMDMgRnlGqKclTAecj60BGE 5lxwmcjPwsTPvX5PTXqNtr/JDAT8yKrpBn863P+raOteaYT5ejz4m1fUWLZmkEpTbQ7W z65wkDJ1K8KijgBr3KD0ruhVvLxfiDvMWp824Blg+w69z4lnJX1DuTKS1LpqML9Nl3SW dexw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-221-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-221-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 bs14-20020a05620a470e00b0076810d8f04esi14036126qkb.266.2023.11.29.03.48.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 03:48:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-221-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-221-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-221-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 86C871C20DEF for ; Wed, 29 Nov 2023 11:48:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 844611D529; Wed, 29 Nov 2023 11:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30883183 for ; Wed, 29 Nov 2023 03:48:35 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4SgHdn3khvz4f3jMs for ; Wed, 29 Nov 2023 19:48:29 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 74B071A0A1C for ; Wed, 29 Nov 2023 19:48:31 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgDnNw4FJWdl3TsMCQ--.42586S4; Wed, 29 Nov 2023 19:48:31 +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 v2 1/2] jbd2: correct the printing of write_flags in jbd2_write_superblock() Date: Wed, 29 Nov 2023 19:47:39 +0800 Message-Id: <20231129114740.2686201-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:cCh0CgDnNw4FJWdl3TsMCQ--.42586S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Xw18ZFWUGry8Wr1fZF4DXFb_yoWfZrb_WF s2vrs7uwnxXr1akws5u3WUurna9r4xuF48C34fKwsxXF4UJF95GFn8Xryqqry3Wa4vgrW3 Cws2vFW8tr93XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbwAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxAIw28IcxkI7VAKI48J MxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwV AFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv2 0xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4 v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E 14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUUUU= 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 Reviewed-by: Jan Kara --- 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