# Re: \[RFC PATCH 00/37\] block: introduce bio\_init\_fields()

- From: Mike Snitzer \<hidden\>
- Date: 2021-01-19 23:01:13 
- List: linux-bcache
- Page: https://ratatoskr.run/linux-bcache/2021/01/197694
- Thread: https://ratatoskr.run/linux-block/2021/01/197632/t.md

```text
On Tue, Jan 19 2021 at 12:05am -0500,
Chaitanya Kulkarni [ref] wrote:

> Hi,
> 
> This is a *compile only RFC* which adds a generic helper to initialize
> the various fields of the bio that is repeated all the places in
> file-systems, block layer, and drivers.
> 
> The new helper allows callers to initialize various members such as
> bdev, sector, private, end io callback, io priority, and write hints.
> 
> The objective of this RFC is to only start a discussion, this it not 
> completely tested at all. Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â 
> Following diff shows code level benefits of this helper :-
> Â 38 files changed, 124 insertions(+), 236 deletions(-)


Please no... this is just obfuscation.

Adding yet another field to set would create a cascade of churn
throughout kernel (and invariably many callers won't need the new field
initialized, so you keep passing 0 for more and more fields).

Nacked-by: Mike Snitzer [ref]

```
