linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: jack@suse.cz, tytso@mit.edu, adilger.kernel@dilger.ca,
	brauner@kernel.org
Cc: mcgrof@kernel.org, willy@infradead.org, hare@suse.de,
	djwong@kernel.org, linux-ext4@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	Davidlohr Bueso <dave@stgolabs.net>
Subject: [PATCH 6/7] fs/ext4: use sleeping version of sb_find_get_block()
Date: Thu, 17 Apr 2025 18:59:20 -0700	[thread overview]
Message-ID: <20250418015921.132400-7-dave@stgolabs.net> (raw)
In-Reply-To: <20250418015921.132400-1-dave@stgolabs.net>

Enable ext4_free_blocks() to use it, which has a cond_resched to begin
with. Convert to the new nonatomic flavor to benefit from potential
performance benefits and adapt in the future vs migration such that
semantics are kept.

Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 fs/ext4/mballoc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index f88424c28194..1e98c5be4e0a 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -6642,7 +6642,8 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
 		for (i = 0; i < count; i++) {
 			cond_resched();
 			if (is_metadata)
-				bh = sb_find_get_block(inode->i_sb, block + i);
+				bh = sb_find_get_block_nonatomic(inode->i_sb,
+								 block + i);
 			ext4_forget(handle, is_metadata, inode, bh, block + i);
 		}
 	}
-- 
2.39.5



  parent reply	other threads:[~2025-04-18  1:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18  1:59 [PATCH v2 0/7] fs/buffer: split pagecache lookups into atomic or blocking Davidlohr Bueso
2025-04-18  1:59 ` [PATCH 1/7] fs/buffer: split locking for pagecache lookups Davidlohr Bueso
2025-04-18  1:59 ` [PATCH 2/7] fs/buffer: introduce sleeping flavors " Davidlohr Bueso
2025-04-18  1:59 ` [PATCH 3/7] fs/buffer: use sleeping version of __find_get_block() Davidlohr Bueso
2025-04-18  1:59 ` [PATCH 4/7] fs/ocfs2: " Davidlohr Bueso
2025-04-18  1:59 ` [PATCH 5/7] fs/jbd2: " Davidlohr Bueso
2025-04-18  1:59 ` Davidlohr Bueso [this message]
2025-04-18  1:59 ` [PATCH 7/7] mm/migrate: fix sleep in atomic for large folios and buffer heads Davidlohr Bueso
2025-04-21 21:06 ` [PATCH v2 0/7] fs/buffer: split pagecache lookups into atomic or blocking Luis Chamberlain
2025-04-22  7:51 ` Christian Brauner
  -- strict thread matches above, loose matches on Subject: below --
2025-04-15 23:16 [PATCH -next " Davidlohr Bueso
2025-04-15 23:16 ` [PATCH 6/7] fs/ext4: use sleeping version of sb_find_get_block() Davidlohr Bueso
2025-04-16  9:39   ` Jan Kara

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=20250418015921.132400-7-dave@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=adilger.kernel@dilger.ca \
    --cc=brauner@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hare@suse.de \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=tytso@mit.edu \
    --cc=willy@infradead.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