lkml.org 
[lkml]   [2012]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [dm-devel] [PATCH v3 02/26] block: Convert integrity to bvec_alloc_bs()
On Mon, Sep 24, 2012 at 03:34:42PM -0700, Kent Overstreet wrote:

[..]
> /**
> * bio_integrity_alloc - Allocate integrity payload and attach it to bio
> * @bio: bio to attach integrity metadata to
> @@ -84,37 +47,39 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio,
> unsigned int nr_vecs)
> {
> struct bio_integrity_payload *bip;
> - unsigned int idx = vecs_to_idx(nr_vecs);
> struct bio_set *bs = bio->bi_pool;
> + unsigned long idx = BIO_POOL_NONE;
> + unsigned inline_vecs;
> +
> + if (!bs) {
> + bip = kmalloc(sizeof(struct bio_integrity_payload) +
> + sizeof(struct bio_vec) * nr_vecs, gfp_mask);
> + inline_vecs = nr_vecs;
> + } else {
> + bip = mempool_alloc(bs->bio_integrity_pool, gfp_mask);
> + inline_vecs = BIP_INLINE_VECS;
> + }
>
> - if (!bs)
> - bs = fs_bio_set;

Ok, this is change of behavior. Previously we will fall back to fs_bio_set
and now you do kmalloc. This change looks to be independent of bip_vec
pointer. Can you please break it out in a separate patch and also explain
that how does this change help.

Thanks
Vivek


\
 
 \ /
  Last update: 2012-10-02 18:01    [W:0.424 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site