Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 2010 11:09:11 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Jaakko Heinonen <jh@freebsd.org>, phk@freebsd.org
Subject:   Re: [patch] extending alloc_unr(9) to allocate specific unit numbers
Message-ID:  <201006211109.11653.jhb@freebsd.org>
In-Reply-To: <20100619154822.GA1166@a91-153-117-195.elisa-laajakaista.fi>
References:  <20100619154822.GA1166@a91-153-117-195.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 19 June 2010 11:48:22 am Jaakko Heinonen wrote:
> 
> Hi,
> 
> I wrote a patch to extend the kernel unit number allocator for
> allocating specific unit numbers. The patch adds a new function
> alloc_unr_specific() which returns the requested unit number if it is
> free and -1 if the number is already allocated or out of the range.
> Unlike alloc_unr(), alloc_unr_specific() may allocate memory and thus
> sleep.
> 
> The patch is here:
> 
> 	http://people.freebsd.org/~jh/patches/alloc_unr_specific.diff
> 
> I think that this functionality has been requested by some people.
> Reviews/comments?
> 
> As an example here is md(4) converted to use
> alloc_unr() / alloc_unr_specific():
> 
> 	http://people.freebsd.org/~jh/patches/md-alloc_unr.diff

This sounds useful to me.  Perhaps ask phk@?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006211109.11653.jhb>