[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06f74e760966a090027bcfec8c22e97bc040e933.camel@perches.com>
Date: Fri, 03 Dec 2021 23:05:37 -0800
From: Joe Perches <joe@...ches.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>, sstabellini@...nel.org,
roger.pau@...rix.com, axboe@...nel.dk
Cc: xen-devel@...ts.xenproject.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] xen-blkfront: Use the bitmap API when applicable
On Sat, 2021-12-04 at 07:57 +0100, Christophe JAILLET wrote:
> So, maybe adding an "official" 'bitmap_size()' (which is already
> existing and duplicated in a few places) would ease things.
>
> It would replace the 'nr_minors = BITS_TO_LONGS(end) * BITS_PER_LONG;'
> and hide the implementation details of the bitmap API.
>
> Something like:
> static __always_inline size_t bitmap_size(unsigned long nr_bits)
> {
> return BITS_TO_LONGS(nr_bits) * sizeof(long);
> }
Or maybe a bitmap_realloc
Powered by blists - more mailing lists