[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <89DC3EEA-72A3-4F6A-9FD8-FD5D5010BE39@mac.com>
Date: Wed, 28 Mar 2007 23:54:17 -0400
From: Kyle Moffett <mrlinuxman@....com>
To: Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc: Eric Dumazet <dada1@...mosbay.com>, Tomas M <tomas@...x.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] max_loop limit
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 better here? Maximum number of nodes
traversed to get to the bottom of the tree given 2^(20) loop devices
is 19 as opposed to the 2^(20) for a linked list. Also, to preserve
compatibility with existing userspace loop tools you should probably
always allocate one extra loop device. Keep a "highest used loopdev"
number and create the one after that so that udev will autocreate a
dev node for it.
Cheers,
Kyle Moffett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists