Re: [PATCH v9] bio: limit bio max size

From: Jens Axboe
Date: Mon May 03 2021 - 10:59:46 EST


On 5/3/21 8:54 AM, Bart Van Assche wrote:
> On 5/3/21 2:52 AM, Changheun Lee wrote:
>> struct queue_limits {
>> + unsigned int bio_max_bytes;
>> +
>> enum blk_bounce bounce;
>> unsigned long seg_boundary_mask;
>> unsigned long virt_boundary_mask;
>
> On April 23 Damien Le Moal posted the following comment about the
> bio_max_bytes member: "Please move this below in the structure together
> with all other fields that are unsigned int too." Making that change
> sounds like a good idea to me.

Why? It's next to an enum, so the patch (as it stands) actually fills a
hole in the struct. Moving it would be a mistake and waste more space.

If anything, we should move the bounce member below virt_boundary_mask,
but since this one fills a hole, that's better left as a separate patch.

--
Jens Axboe