Re: [PATCH 07/10] xfs: simplify the b_page_count calculation
From: Dave Chinner <david@fromorbit.com>
Date: 2021-05-27 23:29:57
From: Dave Chinner <david@fromorbit.com>
Date: 2021-05-27 23:29:57
On Thu, May 27, 2021 at 04:15:44PM -0700, Darrick J. Wong wrote:
On Thu, May 27, 2021 at 08:47:19AM +1000, Dave Chinner wrote:quoted
From: Christoph Hellwig <hch@lst.de> Ever since we stopped using the Linux page cacheThe premise of /that/ is unsettling. Um... did b_pages[] point to pagecache pages, and that's why all that offset shifting was necessary?
Yes. So things like sector/block size < page size would work correctly. We could have multiple buffers point at different offsets in the same page...
quoted
to back XFS buffess/buffes/buffers/quoted
there is no need to take the start sector into account for calculating the number of pages in a buffer, as the data always start from the beginning of the buffer.Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Ta! -Dave. -- Dave Chinner david@fromorbit.com