linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Danilo Krummrich <dakr@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] treewide: idr: align IDR and IDA APIs
Date: Sun, 3 Jul 2022 21:49:14 +0100	[thread overview]
Message-ID: <YsIAypeKXFg97xbG@casper.infradead.org> (raw)
In-Reply-To: <20220703181739.387584-1-dakr@redhat.com>

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.

If you're interested, converting IDR users to the XArray API is an
outstanding project that I'd be interested in encouraging.

  parent reply	other threads:[~2022-07-03 20:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 18:17 [PATCH 1/2] treewide: idr: align IDR and IDA APIs Danilo Krummrich
2022-07-03 18:17 ` [PATCH 2/2] doc/idr: adjust to new IDR allocation API Danilo Krummrich
2022-07-03 20:49 ` Matthew Wilcox [this message]
2022-07-03 22:33   ` [PATCH 1/2] treewide: idr: align IDR and IDA APIs Danilo Krummrich
2022-07-04  0:28   ` Danilo Krummrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YsIAypeKXFg97xbG@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=dakr@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).