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

Tang Yizhou posted 3 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH 3/3] xfs: Fix comment of xfs_buffered_write_iomap_begin()
Posted by Tang Yizhou 1 month, 3 weeks ago
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(-)

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.
-- 
2.25.1
Re: [PATCH 3/3] xfs: Fix comment of xfs_buffered_write_iomap_begin()
Posted by Christoph Hellwig 1 month, 3 weeks ago
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.
Re: [PATCH 3/3] xfs: Fix comment of xfs_buffered_write_iomap_begin()
Posted by Tang Yizhou 1 month, 3 weeks ago
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