Re: [PATCH v3 2/3] btrfs: remove btrfs_bio_alloc() helper

Nikolay Borisov
2021-09-17T12:49:29Z

On 17.09.21 г. 15:43, David Sterba wrote:
> So should we add another helper that takes the exact number and drop the
> parameter everwhere is 0 so it's just btrfs_io_bio_alloc() with the
> fallback?

But by adding another helper we just introduce more indirection.

Actually I'd argue that if 0 is a sane default then BIO_MAX_VECS cannot
be any worse because:

a) It's a number which is as good as 0
b) It's even named. So this is technically better than a plain 0