Re: [git pull] work.misc

From: Linus Torvalds
Date: Sun May 02 2021 - 12:26:48 EST


On Sat, May 1, 2021 at 6:30 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> Mikulas Patocka (1):
> buffer: a small optimization in grow_buffers

Side note: if that optimization actually matters (which I doubt), we
could just make getblk and friends take s_blocksize_bits instead of
the block size. And avoid the whole "find first bit" thing.

As it is, we end up doing odd and broken things if anybody were to
ever use a non-power-of-2 blocksize (we check that it's a multiple of
the hw blocksize, we check that it's between 512 and PAGE_SIZE, but we
don't seem to check that it's a power-of-2).

This is mostly a legacy interface, I don't think anybody cares, but I
thought I'd mention it anyway..

Linus