lkml.org 
[lkml]   [2022]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] treewide: idr: align IDR and IDA APIs
From
On 7/3/22 22:49, Matthew Wilcox wrote:
> On Sun, Jul 03, 2022 at 08:17:38PM +0200, Danilo Krummrich wrote:
>> For allocating IDs the ID allocator (IDA) provides the following
>> functions: ida_alloc(), ida_alloc_range(), ida_alloc_min() and
>> ida_alloc_max() whereas for IDRs only idr_alloc() is available.
>>
>> In contrast to ida_alloc(), idr_alloc() behaves like ida_alloc_range(),
>> which takes MIN and MAX arguments to define the bounds within an ID
>> should be allocated - ida_alloc() instead implicitly uses the maximal
>> bounds possible for MIN and MAX without taking those arguments.
>>
>> In order to align the IDR and IDA APIs this patch provides
>> implementations for idr_alloc(), idr_alloc_range(), idr_alloc_min() and
>> idr_alloc_max(), which are analogue to the IDA API.
>
> I don't really want to make any changes to the IDR API. I want to get
> rid of the IDR API. I'm sorry you did all this work, but you should
> probaby talk to the maintainer before embarking on such a big project.
No problem at all - didn't really took long.
>
> If you're interested, converting IDR users to the XArray API is an
> outstanding project that I'd be interested in encouraging.
>
Yes, I might have a look!

- Danilo

\
 
 \ /
  Last update: 2022-07-04 00:35    [W:0.045 / U:11.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site