[PATCH V9 6/9] nvmet: add bio init helper for different backends

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Tue Jan 12 00:57:38 EST 2021


On 1/11/21 21:40, Damien Le Moal wrote:
>>  	bio = nvmet_req_bio_get(req, NULL);
>> -	bio_set_dev(bio, req->ns->bdev);
>> -	bio->bi_iter.bi_sector = sect;
>> -	bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE;
>> +	nvmet_bio_init(bio, req->ns->bdev, op, sect, NULL, NULL);
> op is used only here I think. So is that variable really necessary ?
>
This is just my personal preference as without using op we will have to
add a new line to a function call, I like to keep the function call in
one line as much as I can.



More information about the Linux-nvme mailing list