[Cluster-devel] [PATCH 4/6] buffer: Convert __block_write_full_page() to __block_write_full_folio()

Matthew Wilcox willy at infradead.org
Wed May 17 15:43:16 UTC 2023


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;
> >  




More information about the Cluster-devel mailing list