diff mbox series

[3/3] xfs: Fix comment of xfs_buffered_write_iomap_begin()

Message ID 20241002130004.69010-4-yizhou.tang@shopee.com (mailing list archive)
State New
Headers show
Series Cleanup some writeback codes | expand

Commit Message

Tang Yizhou Oct. 2, 2024, 1 p.m. UTC
From: Tang Yizhou <yizhou.tang@shopee.com>

Since macro MAX_WRITEBACK_PAGES has been removed from the writeback
path, change MAX_WRITEBACK_PAGES to the actual value of 1024.

Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>
---
 fs/xfs/xfs_iomap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Oct. 2, 2024, 1:45 p.m. UTC | #1
On Wed, Oct 02, 2024 at 09:00:04PM +0800, Tang Yizhou wrote:
> From: Tang Yizhou <yizhou.tang@shopee.com>
> 
> Since macro MAX_WRITEBACK_PAGES has been removed from the writeback
> path, change MAX_WRITEBACK_PAGES to the actual value of 1024.

Well, that's an indicator that this code need a bit of a resync with
the writeback code so that the comment stays true.
Tang Yizhou Oct. 6, 2024, 2:28 p.m. UTC | #2
On Wed, Oct 2, 2024 at 9:45 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Wed, Oct 02, 2024 at 09:00:04PM +0800, Tang Yizhou wrote:
> > From: Tang Yizhou <yizhou.tang@shopee.com>
> >
> > Since macro MAX_WRITEBACK_PAGES has been removed from the writeback
> > path, change MAX_WRITEBACK_PAGES to the actual value of 1024.
>
> Well, that's an indicator that this code need a bit of a resync with
> the writeback code so that the comment stays true.

Thanks for your advice. I will rewrite the code following the logic of
writeback_chunk_size().

Yi
diff mbox series

Patch

diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 1e11f48814c0..bb4018395b6e 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -1097,7 +1097,7 @@  xfs_buffered_write_iomap_begin(
 		end_fsb = imap.br_startoff + imap.br_blockcount;
 	} else {
 		/*
-		 * We cap the maximum length we map here to MAX_WRITEBACK_PAGES
+		 * We cap the maximum length we map here to 1024
 		 * pages to keep the chunks of work done where somewhat
 		 * symmetric with the work writeback does.  This is a completely
 		 * arbitrary number pulled out of thin air.