Re: [patch] extending alloc_unr(9) to allocate specific unit numbers

2010-06-21 Thread John Baldwin
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

Re: [patch] extending alloc_unr(9) to allocate specific unit numbers

2010-06-21 Thread Poul-Henning Kamp
In message 201006211109.11653@freebsd.org, John Baldwin writes: On Saturday 19 June 2010 11:48:22 am Jaakko Heinonen wrote: 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

Re: [patch] extending alloc_unr(9) to allocate specific unit numbers

2010-06-21 Thread Brooks Davis
On Mon, Jun 21, 2010 at 07:25:10PM +, Poul-Henning Kamp wrote: In message 201006211109.11653@freebsd.org, John Baldwin writes: On Saturday 19 June 2010 11:48:22 am Jaakko Heinonen wrote: As an example here is md(4) converted to use alloc_unr() / alloc_unr_specific():

[patch] extending alloc_unr(9) to allocate specific unit numbers

2010-06-19 Thread Jaakko Heinonen
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(),