From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Date: Wed, 17 May 2023 16:43:16 +0100 Subject: [Cluster-devel] [PATCH 4/6] buffer: Convert __block_write_full_page() to __block_write_full_folio() In-Reply-To: <20230517144701.4dnd5pzvzudccc56@localhost> References: <20230517032442.1135379-1-willy@infradead.org> <20230517032442.1135379-5-willy@infradead.org> <20230517144701.4dnd5pzvzudccc56@localhost> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, May 17, 2023 at 04:47:01PM +0200, Pankaj Raghav wrote: > > @@ -1793,7 +1793,7 @@ int __block_write_full_page(struct inode *inode, struct page *page, > > blocksize = bh->b_size; > > bbits = block_size_bits(blocksize); > > > > - block = (sector_t)page->index << (PAGE_SHIFT - bbits); > > + block = (sector_t)folio->index << (PAGE_SHIFT - bbits); > > Shouldn't the PAGE_SHIFT be folio_shift(folio) as you allow larger > folios to be passed to this function in the later patches? No, the folio->index is expressed in multiples of PAGE_SIZE. > > last_block = (i_size_read(inode) - 1) >> bbits; > >