From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E93ACCA473 for ; Sun, 3 Jul 2022 22:34:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbiGCWeF (ORCPT ); Sun, 3 Jul 2022 18:34:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbiGCWeE (ORCPT ); Sun, 3 Jul 2022 18:34:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FF3E55B9 for ; Sun, 3 Jul 2022 15:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656887642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=39QFaLKYr5qxeP42J8w+H78lIoXIr96vwZ8EPM/8bU0=; b=fjmBWFu5neU2Zx9f0DWPRBLVxl8FCNIUqpnUIJGC2l9yiM9nq6arn7Js12QHIDKIpocfcs 9XdgVlzR9L8sb/z8lsW/j1NzdgXUCSXOJg/zWZil8p6HBBgg3bSkNptn33LZftwJQDtjra +w/dWGHRQ3KqqeBbgkIJS9Qo77kvhHU= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-235-xnLJ1pOKO_-JwzK9mh-yxA-1; Sun, 03 Jul 2022 18:34:00 -0400 X-MC-Unique: xnLJ1pOKO_-JwzK9mh-yxA-1 Received: by mail-ed1-f69.google.com with SMTP id q18-20020a056402519200b004358ce90d97so5800311edd.4 for ; Sun, 03 Jul 2022 15:34:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=39QFaLKYr5qxeP42J8w+H78lIoXIr96vwZ8EPM/8bU0=; b=zpCjwB/IQHKcn1l5iCG+4iv3cKFlJyaEqixINXuMnx2AJO+pfbA0xfdaj94KLIaDa3 mNZTPNmmKESN9YUZRqhL0KO5tVkqspGKr16AQ9WmIRXIqHX6WccOB5gC8QDiv4T2Kfnp gfn41nnpJ7nUZIJvTwLuipzl4pabSgJWVpIZMCxCuZCglIqm27mu1zdEvQD8+yO7aYbh 9uMKSt18ZI4kgkLSiYv8N6PXn1cnQG35GM0ZWQ69SmFZHKONWXHgZtAlnnebSVrNzI6m 8T2mqgiHbrLrgRyiiyOucG9cfrctTdvf/X6lQJ0o1cIz7eLvne6dCw0spmzkSZTbxzaz t1xg== X-Gm-Message-State: AJIora9+nmyAzYO9cEgiO4E0Cn8iHATcG1LsvOenVKKwQc+0BeCM0gag 5nMKzlDOKSrQHvfz0D3fYcPIAuKWOz4K7FA6vjRSKy2Cfkbuym0AAXlcntVpFHex4RKuoPBI6N3 FSsM3UOhMc/l9OZwZ6W0QlzsI X-Received: by 2002:a17:906:5047:b0:710:456a:695e with SMTP id e7-20020a170906504700b00710456a695emr26049337ejk.433.1656887639388; Sun, 03 Jul 2022 15:33:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uyclZZNbDVRJhQkp0QbTypFqli4p3UhsSD3lVtrQbnzeNOWBTx/w1SVo8QTzTGvV2cpVJGNA== X-Received: by 2002:a17:906:5047:b0:710:456a:695e with SMTP id e7-20020a170906504700b00710456a695emr26049327ejk.433.1656887639237; Sun, 03 Jul 2022 15:33:59 -0700 (PDT) Received: from ?IPV6:2a02:810d:4b40:2ee8:642:1aff:fe31:a15c? ([2a02:810d:4b40:2ee8:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id f8-20020a056402150800b0043578cf97d0sm19441503edw.23.2022.07.03.15.33.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Jul 2022 15:33:58 -0700 (PDT) Message-ID: <06e3ba23-edfe-bcea-3afe-8a748fc2b5e6@redhat.com> Date: Mon, 4 Jul 2022 00:33:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 1/2] treewide: idr: align IDR and IDA APIs Content-Language: en-US To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220703181739.387584-1-dakr@redhat.com> From: Danilo Krummrich Organization: RedHat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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