From: Wang Jianjian <wangjianjian0@foxmail.com>
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 [thread overview]
Message-ID: <tencent_D6CD42314E6CD7A9ABA771CF10C464390005@qq.com> (raw)
---
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
next reply other threads:[~2023-06-24 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-24 15:52 Wang Jianjian [this message]
2023-08-17 19:54 ` [PATCH] ext4: Free data blocks directly for ordered journal Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_D6CD42314E6CD7A9ABA771CF10C464390005@qq.com \
--to=wangjianjian0@foxmail.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).