public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Franke <cfchris6@yahoo.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.27-rc2] block: loop device partition support
Date: Sat, 09 Aug 2008 02:54:54 +0200	[thread overview]
Message-ID: <489CEADE.4030905@yahoo.de> (raw)

From: Christian Franke <cfchris6@yahoo.de>

By default, partition support of loop devices is disabled and there seems to be 
no way to turn it on without changing code, if loop is not compiled as module.
This patch introduces CONFIG_BLK_DEV_LOOP_MAXPART to make partition support 
configurable via Kconfig. It keeps that feature disabled by default for not 
breaking backward compatibility.

Signed-off-by: Christian Franke <cfchris6@yahoo.de>
---
--- linux-2.6/drivers/block/Kconfig
+++ linux-2.6-loop/drivers/block/Kconfig
@@ -248,6 +248,23 @@ config BLK_DEV_LOOP

  	  Most users will answer N here.

+config BLK_DEV_LOOP_MAXPART
+	int "Maximum number of partitions per loop device"
+	default "0"
+	depends on BLK_DEV_LOOP
+	---help---
+	  Loop device partition support is disabled by default. If max_part
+	  is non-zero, partition support for loop devices is enabled for up to
+	  max_part partitions.
+
+	  Note: If you compile loop as module, you can also pass max_part as
+	        parameter when loading it.
+
+	  Warning: non-zero values break compatibility with applications which
+	           access the loop devices via major and minor number.
+
+	  Most users will answer 0 here.
+
  config BLK_DEV_CRYPTOLOOP
  	tristate "Cryptoloop Support"
  	select CRYPTO
--- linux-2.6/drivers/block/loop.c
+++ linux-2.6-loop/drivers/block/loop.c
@@ -82,7 +82,7 @@
  static LIST_HEAD(loop_devices);
  static DEFINE_MUTEX(loop_devices_mutex);

-static int max_part;
+static int max_part = CONFIG_BLK_DEV_LOOP_MAXPART;
  static int part_shift;

  /*


             reply	other threads:[~2008-08-09  0:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-09  0:54 Christian Franke [this message]
2008-08-09  3:43 ` [PATCH 2.6.27-rc2] block: loop device partition support H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=489CEADE.4030905@yahoo.de \
    --to=cfchris6@yahoo.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox