Re: [PATCH v2 3/7] buffer: Fix grow_buffers() for block size > PAGE_SIZE

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

 



On Fri, Nov 10, 2023 at 08:29:41PM +0900, Ryusuke Konishi wrote:
> On Fri, Nov 10, 2023 at 3:37 PM Ryusuke Konishi wrote:
> > > +       return grow_dev_folio(bdev, block, pos / PAGE_SIZE, size, gfp);
> >
> > "pos" has a loff_t type (= long long type).
> > Was it okay to do C division directly on 32-bit architectures?
> 
> Similar to the comment for patch 5/7, can we safely use the generally
> less expensive shift operation "pos >> PAGE_SHIFT" here ?

If your compiler sees x / 4096 and doesn't optimise it to x >> 12,
you need a better compiler.




[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