Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13943743rwd; Sat, 24 Jun 2023 09:02:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rGhPu3WptFWI7DSMIt2x+Pm5Umeycq2K5vdLfTu7Y8Kmi8AW7gkb2bzyzgHBth9uN/8Km X-Received: by 2002:a05:6870:7686:b0:184:42a2:cad1 with SMTP id dx6-20020a056870768600b0018442a2cad1mr17505159oab.44.1687622572769; Sat, 24 Jun 2023 09:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687622572; cv=none; d=google.com; s=arc-20160816; b=o/UgdfBGRCs4NhVM2ujiBV/Fc/N/va4jcJ4hKxoIlGYgbopSsESRBGHwtk1tCxmZus /CS1hgCU4u6piPwgJ2cFwYwcmWjClkKx450Trn0oIlruA2ksnkAqrcEAwYw74fhGgxuj 98OfJNDBaeZuNvIrAm9uB3Aw8wYphOHOZpiqELnH47tq2j8oPeceCLUjNJJ4RHWA7UT0 8uKaaOmA4cXK47X0DNu0jXWe/hSIZeAIITJMP3nZuRYeKgLuAo14LYRFs7/FRA+pjKMP hgttMSUFc70QFE46bLEcnjIMoTjISy/y0XupycrFV4viE+kYU0yACQ+wD1/jjWeFNkjG IpIg== 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:date :subject:cc:to:from:message-id:dkim-signature; bh=PppnM6CNiCqibVNJC/KxLiZ/Vbb9z1GbgweMJYp75Mw=; fh=td5E5EPrUIPZfhoeO+M6cAA2Kp07jioYyWRObkamrdk=; b=V5sPyGhqbOe1QHrNC3JUcyuP22vdV3I8ScVkfKzbxO8LHs6F+LGC4yCCPQg7ppnMd4 fU1LY6Acl40DLtP3yk3N52ITcGknhrE9txrjolPXgQ+/yRsj5iZHKm6j3dqu3RcJwlF9 w42fC0JS3T3hmicXwQxlcxfgEZCBFQTAJOTQL/wD7Uboyrf63bmVyYaYd/0inoF8UQRo /mMdbWjdwDl/A5T9NEzbjoDpeG5c2FSyaCGQP0G5FvTMzf1TlPgGfDhQVca3Hd477efm RZ1qocAb+hGNnvN73X0l+6/mGz3kbecmAYXzpZZm9PEkCSvuAe6izmMM1wbiRuZmW23P 9f8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=y2FWz7xn; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 64-20020a630243000000b0055725f4e0a7si1752187pgc.679.2023.06.24.09.02.29; Sat, 24 Jun 2023 09:02:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@foxmail.com header.s=s201512 header.b=y2FWz7xn; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbjFXPyb (ORCPT + 99 others); Sat, 24 Jun 2023 11:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbjFXPya (ORCPT ); Sat, 24 Jun 2023 11:54:30 -0400 Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5A941BCA for ; Sat, 24 Jun 2023 08:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1687622058; bh=PppnM6CNiCqibVNJC/KxLiZ/Vbb9z1GbgweMJYp75Mw=; h=From:To:Cc:Subject:Date; b=y2FWz7xnvziyXrCIBIo3tfg9qz3eabP5epHk3nyqloN6Kz9+ms+Dw4PtYYSeQFFGn 1O05MD1yiUia8UTeLo31WJvHgYbAxf8NgIVwx4b9zPtZdQvcmwwv0aplPjBt1AvB6k 2iHdEnuNhUZ5fxZG67JobS6jvLwe8auBxWIVYkGE= Received: from fedora.. ([2409:8a00:2570:b8a0:da5a:8709:bf59:8c40]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id D4E3C8DB; Sat, 24 Jun 2023 23:53:14 +0800 X-QQ-mid: xmsmtpt1687621994t0hh4gafs Message-ID: X-QQ-XMAILINFO: MjBTD0ccEFNA4LdVE34A9s1fyhJEUTDr7etk7LU4fI3p5o0i+8fsMRjry7QTEc r8Md5VW5tz/dEolB/N3xFtU5TKnw6kAAbLRRKZzje86GauHSQeMbnNqrVFmsVRTyJK1+W4BUTZ0n 6UaQAy6Jh+REr0HNQlHxBbNlVzrqnDf590c6qkuCSswsfufqWcYYyRe4+b1JjXtmkzmNZ2cEUJkI /0lFgNQCvqW6d4LnIvpxNe/ZkWphuXi0QCJMrfJIrflD6gVIqnhGm3Ntkbakie1AlCZWb2vySQrH 29y7nOK2/9/5YYGRtM3dkqgqVwZQX0DhSM6tVo6HhxaUo2UMPCPDLwnC3EOesz3R+FCpENfj0Qdj VLoOJdAHDxAzLfqATf4Qh4M+5aZMhMFm2cteIAIZ4eZ7rrLtfkO+TvTLIQNt2q07sX0RTvO9EsBq OSAsCc1y3LbLk5jYrd5nsTGJoru3/eDm5zIN5AsLepMNhMW375PJiSwkpXt2bF2nbeKaal6vNLLb uxOvS3fnsddJzgBNqrb1wZ1seOHsEn6sDbCBdSWYOacY7EfUbsWYwUJw1mlhMH4i4riQEn4NA4a/ zxB7PCqRf+vn++mIMT1FN30Y3WoN9+seuSh3LMdWBrlJw5ZRDXi/A4WNp1UKNSD+cQLKdtsvSskB 19KOmeNnmREkAfuq/n4VwVqNElCakW4mlvUpQKI5gWEv74qPZvUfNaOpTG1GUWfcjcsErojUQHn1 aTpOe3gTtAqeEswS6l4wkra4vzJwJQMHmzdd+jzyMOlJioKBXurw4v/chNjsrped79s0YcwwiK/H NUo7e0dHVwlKPbTHvMlnD0J2DM4Msr6bAdosiDs/MXZq8Tz7Ya3OIyHE3okrTpBj1Zk/Vn1FjUw5 9fsE8OMvDEzzEzIftlFp0eDax7YIUJlB0HXNENz92GjKZLvFsf6+izFvK/y6/idrIDtQ6FmhGuD2 1CENWPm3zoNVvOT445T12EcrH49/yHu7kAid98vR6tnBobhvFDFA== X-QQ-XMRINFO: OaHeJnMbHdYJoNPX7mruotAPXHzc5BrOrw== From: Wang Jianjian To: linux-ext4@vger.kernel.org Cc: wangjianjian0@foxmail.com Subject: [PATCH] ext4: Free data blocks directly for ordered journal Date: Sat, 24 Jun 2023 23:52:59 +0800 X-OQ-MSGID: <20230624155259.62799-1-wangjianjian0@foxmail.com> X-Mailer: git-send-email 2.34.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HELO_DYNAMIC_IPADDR,RCVD_IN_DNSWL_NONE,RDNS_DYNAMIC, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org --- fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 7b2e36d103cb..41fdc2f8c061 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -6206,7 +6206,7 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode, * consistency guarantees. */ if (ext4_handle_valid(handle) && - ((flags & EXT4_FREE_BLOCKS_METADATA) || + ((ext4_should_order_data(inode) && (flags & EXT4_FREE_BLOCKS_METADATA)) || !ext4_should_writeback_data(inode))) { struct ext4_free_data *new_entry; /* -- 2.34.3