Re: [PATCH] ext4: convert to DIV_ROUND_UP() in mpage_process_page_bufs()

From: Eric Biggers
Date: Fri Mar 10 2023 - 16:52:26 EST


On Fri, Mar 10, 2023 at 07:12:31AM +0000, Al Viro wrote:
>
> Out of curiosity (and that's already too brittle for practical use) -
> does DIV_ROUND_UP_ULL() do any better on full example?

'DIV_ROUND_UP_ULL(i_size_read(inode), i_blocksize(inode))' works properly with
clang but not gcc. If i_blocksize() is changed to do '1U << inode->i_blkbits'
instead of '1 << inode->i_blkbits', it works with gcc too.

- Eric