lkml.org 
[lkml]   [2014]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] bio-integrity: add "bip_max_vcnt" into struct bio_integrity_payload
Hi Martin,
On 06/30/2014 07:15 AM, Martin K. Petersen wrote:

>>>>>> "Gu" == Gu Zheng <guz.fnst@cn.fujitsu.com> writes:
>
> [Sorry about the delay. I'm on vacation right now.]
>
> Gu> But it seems that bip_integrity_vecs() will return the wrong number
> Gu> if the bio is not based on any bio_set for some reason(bio->bi_pool
> Gu> == NULL), because in that case, the bip_inline_vecs[0] is malloced
> Gu> directly. So here we add the bip_max_vcnt to record the count of
> Gu> vector slots, and cleanup the function bip_integrity_vecs().
>
> I'm in agreement with your fix.

Thanks.

>
> However, I'm still not sure what the use case is for bios without an
> associated bioset. I do not see any callers that pass in a NULL bioset.

Please refer to bio_kmalloc()--alloc bio via kmalloc.
And IMO, the API(e.g. bio_alloc_bioset) is EXPORT, any guys(including
some out of mainline code, some special drivers) can alloc a bio via
kmalloc without based on associated bioset.

Regards,
Gu

>




\
 
 \ /
  Last update: 2014-06-30 06:01    [W:0.315 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site