public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Ignore partition table on device
@ 2007-06-02 18:55 Jonathan Schleifer
  2007-06-02 20:29 ` H. Peter Anvin
  2007-06-02 22:54 ` Andries Brouwer
  0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Schleifer @ 2007-06-02 18:55 UTC (permalink / raw)
  To: aeb; +Cc: linux-kernel

Hello.

This patch adds a new kernel parameter (ignore_partitions=device) to
the kernel. It is useful when using a fake RAID with dmraid so that
Linux won't complain about attemps to access the drive beyond its
boundaries when udev and/or hald are started.

--- linux-2.6.21.1/fs/partitions/check.c.orig	2007-06-02 14:19:26.000000000 +0200
+++ linux-2.6.21.1/fs/partitions/check.c	2007-06-02 15:16:22.000000000 +0200
@@ -39,6 +39,14 @@
 extern void md_autodetect_dev(dev_t dev);
 #endif
 
+static char * __initdata ignore_dev;
+static int __init ignore_dev_fn(char *str)
+{
+	ignore_dev = str;
+	return 1;
+}
+__setup("ignore_partitions=", ignore_dev_fn);
+
 int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/
 
 static int (*check_part[])(struct parsed_partitions *, struct block_device *) = {
@@ -165,6 +173,13 @@
 		sprintf(state->name, "p");
 
 	state->limit = hd->minors;
+
+	if (ignore_dev != NULL && !strcmp(state->name, ignore_dev)) {
+		memset(&state->parts, 0, sizeof(state->parts));
+		printk(" partition table ignored.\n");
+		return state;
+	}
+
 	i = res = err = 0;
 	while (!res && check_part[i]) {
 		memset(&state->parts, 0, sizeof(state->parts));

-- 
Jonathan

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <fa.4wKuD5mNHMp1umbfR+OImkVtgUw@ifi.uio.no>]

end of thread, other threads:[~2007-06-03  6:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-02 18:55 [PATCH] Ignore partition table on device Jonathan Schleifer
2007-06-02 20:29 ` H. Peter Anvin
2007-06-02 21:34   ` Jonathan Schleifer
2007-06-02 22:21     ` H. Peter Anvin
2007-06-02 22:43       ` Jonathan Schleifer
2007-06-02 23:49         ` H. Peter Anvin
2007-06-02 22:54 ` Andries Brouwer
     [not found] <fa.4wKuD5mNHMp1umbfR+OImkVtgUw@ifi.uio.no>
     [not found] ` <fa.vZzvuMSQgFqVdMg4HFBBvE7gt1s@ifi.uio.no>
2007-06-03  6:39   ` Robert Hancock

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