Re: [GIT PULL] Btrfs updates for 5.13

From: Linus Torvalds
Date: Mon Apr 26 2021 - 16:55:24 EST

I've pulled this, but:

On Mon, Apr 26, 2021 at 1:01 PM David Sterba <dsterba@xxxxxxxx> wrote:
> Matthew Wilcox (Oracle) (1):
> btrfs: add and use readahead_batch_length

This one is buggy, or at least questionable.

Yes, yes, the function looks trivial. That doesn't make it right:

static inline loff_t readahead_batch_length(struct readahead_control *rac)
return rac->_batch_count * PAGE_SIZE;

the above does not get the types right, and silently does different
typecasting than the code clearly intends from the return type of the

It may not matter much in practice, but it's still wrong.