drivers/block/loop.c:max_loop
Hello,
I run a relatively large FTP server, and I've just reached
the max_loop limit of loop devices here (I use loopback mount of ISO 9660 images of Linux distros here). Is there any reason for keeping the max_loop variable in loop.c set to 8?
Thanks,
-Yenya
Signature · 4 lines
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz> http://www.fi.muni.cz/~kas/ \\ PGP: finger kas at aisa.fi.muni.cz 0D99A7FB206605D7 8B35FCDE05B18A5E // \\\ Czech Linux Homepage: http://www.linux.cz/ /// Mantra: "everything is a stream of bytes". Repeat until enlightened. --Linus
Quoted 6 lines · Jan Kasprzak
Hello,
I run a relatively large FTP server, and I've just reached
themax_looplimit of loop devices here (I use loopback mount of ISO 9660 images of Linux distros here). Is there any reason for keeping themax_loopvariable inloop.cset to 8?
Memory requirements -- nothing prevents you from loading it with a bigger max count though...
Signature · 1 line
Jens Axboe
Jens Axboe wrote:
: On Mon, Apr 16 2001, Jan Kasprzak wrote:
: > Hello,
: >
: > I run a relatively large FTP server, and I've just reached
: > the max_loop limit of loop devices here (I use loopback mount of ISO 9660 : > images of Linux distros here). Is there any reason for keeping : > the max_loop variable in loop.c set to 8?
:
: Memory requirements -- nothing prevents you from loading it with a : bigger max count though...
:
I would suggest to make the limit configurable by /proc orioctl() in run-time. Or even better, to make all allocations on first /dev/loopN open. Should I try to implement something like that?
-Yenya
Signature · 4 lines
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz> http://www.fi.muni.cz/~kas/ \\ PGP: finger kas at aisa.fi.muni.cz 0D99A7FB206605D7 8B35FCDE05B18A5E // \\\ Czech Linux Homepage: http://www.linux.cz/ /// Mantra: "everything is a stream of bytes". Repeat until enlightened. --Linus
Quoted 7 lines · Jan Kasprzak
Jens Axboe wrote:
: On Mon, Apr 16 2001, Jan Kasprzak wrote:
: > Hello,
: >
: > I run a relatively large FTP server, and I've just reached
: > themax_looplimit of loop devices here (I use loopback mount of ISO 9660 : > images of Linux distros here). Is there any reason for keeping
Quoted 8 lines
: > the
max_loopvariable inloop.cset to 8?
:
: Memory requirements -- nothing prevents you from loading it with a : bigger max count though...
:
I would suggest to make the limit configurable by /proc orioctl()in run-time. Or even better, to make all allocations on first/dev/loopNopen. Should I try to implement something like that?
Overkill, imo. If you use a module setup, add a max_loop to your /etc/modules.conf. If not, add the identical max_loop to your lilo.conf append line.
Ok, just noticed that the module option is missing. Attached patch should rectify that oversight.
Signature · 1 line
Jens Axboe
block/loop.c renamed from opt/kernel/linux-2.4.4-pre3/drivers/block/loop.c +3 -2
@@ -476,7 +476,7 @@*/ bh =loop_get_buffer (lo, rbh); bh->b_private = rbh; -IV =loop_get_iv (lo, bh->b_rsector); +IV =loop_get_iv (lo, rbh->b_rsector);if (rw ==WRITE ) {set_bit (BH_Dirty, &bh->b_state); if (lo_do_transfer(lo, WRITE, bh->b_data, rbh->b_data,
@@ -620,7 +620,6 @@* If we can't read - sorry. If we only can't write - well, * it's going to be read-only. */ - error = -EINVAL ;if (!aops->readpage) goto out_putf;
@@ -1034,6 +1033,8 @@module_init (loop_init);module_exit (loop_exit); + +MODULE_PARM (max_loop,"i" );#ifndef MODULE static int __init max_loop_setup (char *str)
Quoted 2 lines · Jens Axboe
Ok, just noticed that the module option is missing. Attached patch should rectify that oversight.
duh, already there of course.
Signature · 1 line
Jens Axboe