Message ID | 20250415231635.83960-7-dave@stgolabs.net (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | fs/buffer: split pagecache lookups into atomic or blocking | expand |
On Tue 15-04-25 16:16:34, Davidlohr Bueso wrote: > 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> > Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Looks good. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > 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 >
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); } }
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> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> --- fs/ext4/mballoc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)