diff mbox series

[4/7] fs/ocfs2: use sleeping version of __find_get_block()

Message ID 20250415231635.83960-5-dave@stgolabs.net (mailing list archive)
State New
Headers show
Series fs/buffer: split pagecache lookups into atomic or blocking | expand

Commit Message

Davidlohr Bueso April 15, 2025, 11:16 p.m. UTC
This is a path that allows for blocking as it does IO. 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/ocfs2/journal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Kara April 16, 2025, 9:35 a.m. UTC | #1
On Tue 15-04-25 16:16:32, Davidlohr Bueso wrote:
> This is a path that allows for blocking as it does IO. 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>

One nit below but either way feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index f1b4b3e611cb..c7a9729dc9d0 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -1249,7 +1249,7 @@ static int ocfs2_force_read_journal(struct inode *inode)
>  		}
>  
>  		for (i = 0; i < p_blocks; i++, p_blkno++) {
> -			bh = __find_get_block(osb->sb->s_bdev, p_blkno,
> +			bh = __find_get_block_nonatomic(osb->sb->s_bdev, p_blkno,

This could be using sb_find_get_block_nonatomic().

>  					osb->sb->s_blocksize);
>  			/* block not cached. */
>  			if (!bh)
diff mbox series

Patch

diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index f1b4b3e611cb..c7a9729dc9d0 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -1249,7 +1249,7 @@  static int ocfs2_force_read_journal(struct inode *inode)
 		}
 
 		for (i = 0; i < p_blocks; i++, p_blkno++) {
-			bh = __find_get_block(osb->sb->s_bdev, p_blkno,
+			bh = __find_get_block_nonatomic(osb->sb->s_bdev, p_blkno,
 					osb->sb->s_blocksize);
 			/* block not cached. */
 			if (!bh)