Re: [PATCH v2 7/7] buffer: Fix more functions for block size > PAGE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 12, 2023 at 04:52:56AM +0000, Matthew Wilcox wrote:
> On Sat, Nov 11, 2023 at 10:06:13AM -0800, Eric Biggers wrote:
> > On Fri, Nov 10, 2023 at 02:26:43PM +0000, Matthew Wilcox wrote:
> > > Would you want to invest more engineering time in changing it?
> > 
> > It seems logical to just keep the existing approach instead of spending time
> > trying to justify changing it to a less efficient one (divides).
> 
> Except the existing approach doesn't work for block size > PAGE_SIZE

A shift does still work; the block size is still a power of 2, after all.
'(sector_t)folio->index << (PAGE_SHIFT - bbits)' just needs to be changed to
'folio_pos(folio) >> bbits'.

- Eric




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux