Re: [PATCH] max_loop limit, loop.c final working version

2007-03-29 Thread Tomas M
This is a diff from Ken Chen, who sent it to me a week ago and received the claimed prize $256. I think it's partially based on Jan's code, while if fixes the bug Jan mentioned (as far as I know). It does the following: - allocate loop dynamically on the fly - allocate one more (spare) loop

Re: [PATCH] max_loop limit, loop.c final working version

2007-03-29 Thread Tomas M
This is a diff from Ken Chen, who sent it to me a week ago and received the claimed prize $256. I think it's partially based on Jan's code, while if fixes the bug Jan mentioned (as far as I know). It does the following: - allocate loop dynamically on the fly - allocate one more (spare) loop

Re: [PATCH] max_loop limit, t2

2007-03-28 Thread Jan Engelhardt
On Mar 25 2007 10:40, Tomas M wrote: >On ??, Jan Engelhardt wrote: > >> here's one. Allocates all the fluff dynamically. It does not >> create any dev nodes by itself, so you need to do it (à la mdadm) > > I'm afraid that this would break a lot of things, for example mount > -o loop will not

Re: [PATCH] max_loop limit

2007-03-28 Thread Kyle Moffett
On Mar 23, 2007, at 19:26:34, Jan Engelhardt wrote: here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm), but you'll get all 1048576 available minors. +static LIST_HEAD(loop_devices); Maybe an rbtree would work

Re: [PATCH] max_loop limit

2007-03-28 Thread Karel Zak
On Sun, Mar 25, 2007 at 10:40:10AM +0200, Tomas M wrote: > >here's one. Allocates all the fluff dynamically. It does not create any > >dev nodes by itself, so you need to do it (à la mdadm) > > I'm afraid that this would break a lot of things, for example mount -o > loop will not work anymore

Re: [PATCH] max_loop limit

2007-03-28 Thread Karel Zak
On Sun, Mar 25, 2007 at 10:40:10AM +0200, Tomas M wrote: here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm) I'm afraid that this would break a lot of things, for example mount -o loop will not work anymore unless

Re: [PATCH] max_loop limit

2007-03-28 Thread Kyle Moffett
On Mar 23, 2007, at 19:26:34, Jan Engelhardt wrote: here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm), but you'll get all 1048576 available minors. +static LIST_HEAD(loop_devices); Maybe an rbtree would work

Re: [PATCH] max_loop limit, t2

2007-03-28 Thread Jan Engelhardt
On Mar 25 2007 10:40, Tomas M wrote: On ??, Jan Engelhardt wrote: here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm) I'm afraid that this would break a lot of things, for example mount -o loop will not work anymore

Re: [PATCH] max_loop limit

2007-03-25 Thread Tomas M
here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm) I'm afraid that this would break a lot of things, for example mount -o loop will not work anymore unless you create /dev/loop* manually first, am I correct? In this

Re: [PATCH] max_loop limit

2007-03-25 Thread Tomas M
here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm) I'm afraid that this would break a lot of things, for example mount -o loop will not work anymore unless you create /dev/loop* manually first, am I correct? In this

Re: [PATCH] max_loop limit

2007-03-24 Thread Ken Chen
On 3/23/07, Jan Engelhardt <[EMAIL PROTECTED]> wrote: @@ -1383,7 +1380,7 @@ int loop_unregister_transfer(int number) xfer_funcs[n] = NULL; - for (lo = _dev[0]; lo < _dev[max_loop]; lo++) { + list_for_each_entry(lo, _devices, lo_list) {

Re: [PATCH] max_loop limit

2007-03-24 Thread Ken Chen
On 3/23/07, Jan Engelhardt <[EMAIL PROTECTED]> wrote: Sadly, it locks up the foreground process (losetup that would be), and I have not yet figured out why. And the mpt regression elsewhere is hindering me in finding out faster. You need to tell the block layer that each loop device is a whole

Re: [PATCH] max_loop limit

2007-03-24 Thread Ken Chen
On 3/23/07, Jan Engelhardt [EMAIL PROTECTED] wrote: Sadly, it locks up the foreground process (losetup that would be), and I have not yet figured out why. And the mpt regression elsewhere is hindering me in finding out faster. You need to tell the block layer that each loop device is a whole

Re: [PATCH] max_loop limit

2007-03-24 Thread Ken Chen
On 3/23/07, Jan Engelhardt [EMAIL PROTECTED] wrote: @@ -1383,7 +1380,7 @@ int loop_unregister_transfer(int number) xfer_funcs[n] = NULL; - for (lo = loop_dev[0]; lo loop_dev[max_loop]; lo++) { + list_for_each_entry(lo, loop_devices, lo_list) {

[PATCH] max_loop limit

2007-03-23 Thread Jan Engelhardt
Hi, here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm), but you'll get all 1048576 available minors. Sadly, it locks up the foreground process (losetup that would be), and I have not yet figured out why. And the mpt

[PATCH] max_loop limit

2007-03-23 Thread Jan Engelhardt
Hi, here's one. Allocates all the fluff dynamically. It does not create any dev nodes by itself, so you need to do it (à la mdadm), but you'll get all 1048576 available minors. Sadly, it locks up the foreground process (losetup that would be), and I have not yet figured out why. And the mpt