public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/block/loop.c:max_loop
@ 2001-04-16 15:39 Jan Kasprzak
  2001-04-16 16:36 ` drivers/block/loop.c:max_loop Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kasprzak @ 2001-04-16 15:39 UTC (permalink / raw)
  To: linux-kernel

	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

-- 
\ 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/block/loop.c:max_loop
  2001-04-16 15:39 drivers/block/loop.c:max_loop Jan Kasprzak
@ 2001-04-16 16:36 ` Jens Axboe
  2001-04-16 18:00   ` drivers/block/loop.c:max_loop Jan Kasprzak
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2001-04-16 16:36 UTC (permalink / raw)
  To: Jan Kasprzak; +Cc: linux-kernel

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...

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/block/loop.c:max_loop
  2001-04-16 16:36 ` drivers/block/loop.c:max_loop Jens Axboe
@ 2001-04-16 18:00   ` Jan Kasprzak
  2001-04-16 18:44     ` drivers/block/loop.c:max_loop Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kasprzak @ 2001-04-16 18:00 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

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 or
ioctl() in run-time. Or even better, to make all allocations on
first /dev/loopN open. Should I try to implement something like that?

-Yenya

-- 
\ 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/block/loop.c:max_loop
  2001-04-16 18:00   ` drivers/block/loop.c:max_loop Jan Kasprzak
@ 2001-04-16 18:44     ` Jens Axboe
  2001-04-16 18:50       ` drivers/block/loop.c:max_loop Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2001-04-16 18:44 UTC (permalink / raw)
  To: Jan Kasprzak; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

On Mon, Apr 16 2001, Jan Kasprzak wrote:
> 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 or
> ioctl() in run-time. Or even better, to make all allocations on
> first /dev/loopN open. 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.

-- 
Jens Axboe


[-- Attachment #2: loop-maxloop-mod-1 --]
[-- Type: text/plain, Size: 762 bytes --]

--- /opt/kernel/linux-2.4.4-pre3/drivers/block/loop.c	Sun Apr 15 16:24:12 2001
+++ drivers/block/loop.c	Mon Apr 16 20:43:39 2001
@@ -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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/block/loop.c:max_loop
  2001-04-16 18:44     ` drivers/block/loop.c:max_loop Jens Axboe
@ 2001-04-16 18:50       ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2001-04-16 18:50 UTC (permalink / raw)
  To: Jan Kasprzak; +Cc: linux-kernel

On Mon, Apr 16 2001, Jens Axboe wrote:
> Ok, just noticed that the module option is missing. Attached patch
> should rectify that oversight.

duh, already there of course.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-04-16 18:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-16 15:39 drivers/block/loop.c:max_loop Jan Kasprzak
2001-04-16 16:36 ` drivers/block/loop.c:max_loop Jens Axboe
2001-04-16 18:00   ` drivers/block/loop.c:max_loop Jan Kasprzak
2001-04-16 18:44     ` drivers/block/loop.c:max_loop Jens Axboe
2001-04-16 18:50       ` drivers/block/loop.c:max_loop Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox