Skip to contentSkip to conversation

FILESYSTEMS: Make "advanced partitions" immediately unselectable.

PATCH In review Robert P. J. Day 4 participants 16 messages Jul 26, 2008 – Jul 29, 2008 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 FILESYSTEMS: Make "advanced partitions" immediately unselectable.

Use "menuconfig" to allow all advanced partitions to be deselectable from the top-level FS menu.

---

 fs/Kconfig            |    4 ----
 fs/partitions/Kconfig |    9 +++++++--
 2 files changed, 7 insertions(+), 6 deletions(-)
fs/Kconfig +0 -4
index 37db79a..f06241f 100644
@@ -2143,11 +2143,7 @@ config 9P_FS
 endif # NETWORK_FILESYSTEMS
 
 if BLOCK
-menu "Partition Types"
-
 source "fs/partitions/Kconfig"
-
-endmenu
 endif
 
 source "fs/nls/Kconfig"
fs/partitions/Kconfig +7 -2
index cb5f0a3..4bb87d2 100644
@@ -1,8 +1,9 @@
 #
 # Partition configuration
 #
-config PARTITION_ADVANCED
-	bool "Advanced partition selection"
+
+menuconfig PARTITION_ADVANCED
+	bool "Advanced partition support"
 	help
 	  Say Y here if you would like to use hard disks under Linux which
 	  were partitioned under an operating system running on a different
@@ -14,6 +15,8 @@ config PARTITION_ADVANCED
 
 	  If unsure, say N.
 
+if PARTITION_ADVANCED
+
 config ACORN_PARTITION
 	bool "Acorn partition support" if PARTITION_ADVANCED
 	default y if ARCH_ACORN
@@ -249,3 +252,5 @@ config SYSV68_PARTITION
 	  partition table format used by Motorola Delta machines (using
 	  sysv68).
 	  Otherwise, say N.
+
+endif # PARTITION_ADVANCED

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================

#1 lore raw
Quoted 5 lines · On Sat, 26 Jul 2008 09:20:49 -0400 (EDT) Robert P. J. Day wrote:

Use "menuconfig" to allow all advanced partitions to be deselectable from the top-level FS menu.

Hi,

I like the idea, but it does have one problem. Before this patch, if someone disabled PARTITION_ADVANCED, the .config would still contain CONFIG_MSDOS_PARTITION=y
but after this change, that config line is missing. Not good.

Quoted 48 lines

---

 fs/Kconfig            |    4 ----
 fs/partitions/Kconfig |    9 +++++++--
 2 files changed, 7 insertions(+), 6 deletions(-)
fs/Kconfig +0 -4
index 37db79a..f06241f 100644
@@ -2143,11 +2143,7 @@ config 9P_FS
 endif # NETWORK_FILESYSTEMS
 
 if BLOCK
-menu "Partition Types"
-
 source "fs/partitions/Kconfig"
-
-endmenu
 endif
 
 source "fs/nls/Kconfig"
fs/partitions/Kconfig +5 -2
index cb5f0a3..4bb87d2 100644
@@ -1,8 +1,9 @@
 #
 # Partition configuration
 #
-config PARTITION_ADVANCED
-	bool "Advanced partition selection"
+
+menuconfig PARTITION_ADVANCED
+	bool "Advanced partition support"
 	help
 	  Say Y here if you would like to use hard disks under Linux which
 	  were partitioned under an operating system running on a different
@@ -14,6 +15,8 @@ config PARTITION_ADVANCED
 
 	  If unsure, say N.
 
+if PARTITION_ADVANCED
+
 config ACORN_PARTITION
 	bool "Acorn partition support" if PARTITION_ADVANCED
 	default y if ARCH_ACORN

fs/partitions/Kconfig config SYSV68_PARTITION · line 256

Quoted 5 lines
fs/partitions/Kconfig +2 -0
@@ -249,3 +252,5 @@ config SYSV68_PARTITION
 	  partition table format used by Motorola Delta machines (using
 	  sysv68).
 	  Otherwise, say N.
+
+endif # PARTITION_ADVANCED

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

#2 lore raw
Quoted 6 lines · Randy Dunlap
Quoted 4 lines · On Sat, 26 Jul 2008 09:20:49 -0400 (EDT) Robert P. J. Day wrote:

Use "menuconfig" to allow all advanced partitions to be deselectable from the top-level FS menu.

Quoted 8 lines
Quoted 1 line

Hi,

I like the idea, but it does have one problem. Before this patch, if someone disabled PARTITION_ADVANCED, the .config would still contain CONFIG_MSDOS_PARTITION=y but after this change, that config line is missing. Not good.

ah, quite right. the obvious solution is to move MSDOS_PARTITION out of there since it doesn't even *remotely* qualify as an "advanced" partition -- it's about as basic as it gets. i'll ponder and resubmit.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================

#3 lore raw
Quoted 17 lines · Robert P. J. Day
Quoted 6 lines · Randy Dunlap
Quoted 4 lines · On Sat, 26 Jul 2008 09:20:49 -0400 (EDT) Robert P. J. Day wrote:

Use "menuconfig" to allow all advanced partitions to be deselectable from the top-level FS menu.

Quoted 8 lines
Quoted 1 line

Hi,

I like the idea, but it does have one problem. Before this patch, if someone disabled PARTITION_ADVANCED, the .config would still contain CONFIG_MSDOS_PARTITION=y but after this change, that config line is missing. Not good.

Quoted 4 lines

ah, quite right. the obvious solution is to move MSDOS_PARTITION out of there since it doesn't even *remotely* qualify as an "advanced" partition -- it's about as basic as it gets. i'll ponder and resubmit.

It's not that any of the partition types in the menu are advanced - it's that the menu lets an "advanced" user add or remove support for partitions types that are not native to their platform. This is so someone can, say, mount a sparc scsi disk on an x86 box.

Signature · 1 line
Calvin Walton <[email protected]>
#4 lore raw
Quoted 18 lines · Calvin Walton
Quoted 17 lines · Robert P. J. Day
Quoted 14 lines · Randy Dunlap
Quoted 5 lines · On Sat, 26 Jul 2008 09:20:49 -0400 (EDT) Robert P. J. Day wrote:

Use "menuconfig" to allow all advanced partitions to be deselectable from the top-level FS menu.

Hi,

I like the idea, but it does have one problem. Before this patch, if someone disabled PARTITION_ADVANCED, the .config would still contain CONFIG_MSDOS_PARTITION=y but after this change, that config line is missing. Not good.

Quoted 6 lines
Quoted 4 lines

ah, quite right. the obvious solution is to move MSDOS_PARTITION out of there since it doesn't even *remotely* qualify as an "advanced" partition -- it's about as basic as it gets. i'll ponder and resubmit.

It's not that any of the partition types in the menu are advanced -

...

but that's how it's **listed** in "make menuconfig". once you click on

Partition Types --->

the top-level config option that selects or deselects all of that menu is labelled:

[*] Advanced partition selection

      ^^^^^^^^

there's a logical inconsistency in that part of the menu -- are those just regular partitions, or are they "advanced" partitions? pick one.

i'm not sure there's an elegant redesign for that -- an obvious fix
(if it's even worth doing) is to move the fundamental MSDOS partition option out of there since it's not an "advanced" option. and that MSDOS option doesn't even really belong there anyway since, even if you deselect that entire submenu, you still get CONFIG_MSDOS_PARTITION selected in your eventual .config file.

yes, it's nitpicking but, as it's laid out right now, it's
unnecessarily confusing and inconsistent. but i don't know if there's a trivial fix for it.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================

#5 lore raw
Quoted 4 lines

yes, it's nitpicking but, as it's laid out right now, it's
unnecessarily confusing and inconsistent. but i don't know if there's a trivial fix for it.

Yes, I'd call MSDOS partitions basic, not Advanced, and then put all others under an Advanced menu that can be toggled on/off easily with menuconfig.

Not quite trivial, but not messy either.

Patch below. Comments?
---

From: Randy Dunlap <[email protected]>

Use "menuconfig" to allow all advanced partitions to be deselectable from the FS partitions menu.
However, leave MSDOS_PARTITION as a basic partition type (i.e., not advanced), so that its "default y" remains in effect.

---

 fs/Kconfig            |    6 ----
 fs/partitions/Kconfig |   72 ++++++++++++++++++++++++++++----------------------
 2 files changed, 41 insertions(+), 37 deletions(-)
fs/Kconfig +0 -6
@@ -2142,14 +2142,8 @@ config 9P_FS
 
 endif # NETWORK_FILESYSTEMS
 
-if BLOCK
-menu "Partition Types"
-
 source "fs/partitions/Kconfig"
 
-endmenu
-endif
-
 source "fs/nls/Kconfig"
 source "fs/dlm/Kconfig"
 
fs/partitions/Kconfig +41 -31

218 lines not on this page · raw message

#6 lore raw
Quoted 11 lines · Randy Dunlap
Quoted 4 lines

yes, it's nitpicking but, as it's laid out right now, it's
unnecessarily confusing and inconsistent. but i don't know if there's a trivial fix for it.

Yes, I'd call MSDOS partitions basic, not Advanced, and then put all others under an Advanced menu that can be toggled on/off easily with menuconfig.

Not quite trivial, but not messy either.

Patch below. Comments?

i'll check shortly and get back to you. thanks.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================

#7 lore raw
In reply to Randy Dunlap
Quoted 11 lines · Randy Dunlap
Quoted 3 lines

yes, it's nitpicking but, as it's laid out right now, it's
unnecessarily confusing and inconsistent. but i don't know if there's a trivial fix for it.

Yes, I'd call MSDOS partitions basic, not Advanced, and then put all others under an Advanced menu that can be toggled on/off easily with menuconfig.

Not quite trivial, but not messy either.

Patch below. Comments?

... patch snipped ...

i suspect that's as good as it's going to get, but it's unfortunate
that it adds yet another level of submenu under "Partition types." personally, i was pondering a top level submenu entry of "Advanced partition types" in which the (non-advanced) MSDOS partition support was yanked out of there *entirely*.

it strikes me that, at least on x86, MSDOS partition support is so
fundamental that it should take work for someone to turn it *off*. perhaps simply have it on by default, and force someone to go under "Configure standard kernel features (for small systems)" (CONFIG_EMBEDDED) to make it go away?

seriously, how often is someone going to build a kernel for x86 and
not need MSDOS partition support? just curious.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================

#8 lore raw
Quoted 10 lines · On Mon, 28 Jul 2008 14:42:47 -0400 (EDT) Robert P. J. Day wrote:
Quoted 8 lines · Randy Dunlap
Quoted 3 lines

yes, it's nitpicking but, as it's laid out right now, it's
unnecessarily confusing and inconsistent. but i don't know if there's a trivial fix for it.

Yes, I'd call MSDOS partitions basic, not Advanced, and then put all others under an Advanced menu that can be toggled on/off easily with menuconfig.

Quoted 8 lines
Quoted 3 lines

Not quite trivial, but not messy either.

Patch below. Comments?

... patch snipped ...

i suspect that's as good as it's going to get, but it's unfortunate
that it adds yet another level of submenu under "Partition types."

I looked but didn't see a way to avoid that.

Quoted 3 lines

personally, i was pondering a top level submenu entry of "Advanced partition types" in which the (non-advanced) MSDOS partition support was yanked out of there *entirely*.

I did that first but left MSDOS partitioning in the main FS menu. I didn't like it being separated from the others.

Quoted 5 lines

it strikes me that, at least on x86, MSDOS partition support is so
fundamental that it should take work for someone to turn it *off*. perhaps simply have it on by default, and force someone to go under "Configure standard kernel features (for small systems)" (CONFIG_EMBEDDED) to make it go away?

That could be done, but still, I'd rather have all of the partition types close together instead of far apart.

Quoted 2 lines

seriously, how often is someone going to build a kernel for x86 and
not need MSDOS partition support? just curious.

since MP3 players & cameras use it? :) Other than that, I could do without it for awhile.

Thanks.
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

#9 lore raw
Quoted 16 lines · Randy Dunlap
Quoted 14 lines · On Mon, 28 Jul 2008 14:42:47 -0400 (EDT) Robert P. J. Day wrote:
Quoted 11 lines · Randy Dunlap
Quoted 3 lines

yes, it's nitpicking but, as it's laid out right now, it's
unnecessarily confusing and inconsistent. but i don't know if there's a trivial fix for it.

Yes, I'd call MSDOS partitions basic, not Advanced, and then put all others under an Advanced menu that can be toggled on/off easily with menuconfig.

Not quite trivial, but not messy either.

Patch below. Comments?

Quoted 7 lines
Quoted 5 lines

... patch snipped ...

i suspect that's as good as it's going to get, but it's
unfortunate that it adds yet another level of submenu under "Partition types."

I looked but didn't see a way to avoid that.

upon further consideration, i don't either, so i'm happy with it.
the only thing i might add is some actual help text for that MSDOS_PARTITION option -- something more informative than "Say Y here." perhaps a sentence explaining *why* people might want to say "Y" there? or the rare circumstances under which they wouldn't? just a thought.

other than that, it looks good.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================

#10 lore raw
In reply to Robert P. J. Day
Quoted 22 lines · Robert P. J. Day
Quoted 11 lines · Randy Dunlap
Quoted 3 lines

yes, it's nitpicking but, as it's laid out right now, it's
unnecessarily confusing and inconsistent. but i don't know if there's a trivial fix for it.

Yes, I'd call MSDOS partitions basic, not Advanced, and then put all others under an Advanced menu that can be toggled on/off easily with menuconfig.

Not quite trivial, but not messy either.

Patch below. Comments?

... patch snipped ...

i suspect that's as good as it's going to get, but it's unfortunate
that it adds yet another level of submenu under "Partition types." personally, i was pondering a top level submenu entry of "Advanced partition types" in which the (non-advanced) MSDOS partition support was yanked out of there *entirely*.

Quoted 8 lines

it strikes me that, at least on x86, MSDOS partition support is so
fundamental that it should take work for someone to turn it *off*. perhaps simply have it on by default, and force someone to go under "Configure standard kernel features (for small systems)" (CONFIG_EMBEDDED) to make it go away?

seriously, how often is someone going to build a kernel for x86 and
not need MSDOS partition support? just curious.

I've been compiling msdos support as modules for ages, and I have one x86 machine here that hasn't referenced an msdos filesystem for over four years ;)

Grant.

#11 lore raw
In reply to Robert P. J. Day
Quoted 11 lines · Robert P. J. Day

On Mon, 28 Jul 2008, Randy Dunlap wrote:
it strikes me that, at least on x86, MSDOS partition support is so fundamental that it should take work for someone to turn it *off*. perhaps simply have it on by default, and force someone to go under "Configure standard kernel features (for small systems)" (CONFIG_EMBEDDED) to make it go away?

seriously, how often is someone going to build a kernel for x86 and
not need MSDOS partition support? just curious.

rday

Naturally, on an architecture other than x86 (e.g. sparc) you'll want to ensure that the platform's native partitioning format (for sparc, SUN_PARTITION) is similarly on by default, and difficult to unselect.

In this case, you could get by perfectly without msdos partitions enabled (although the default is still to enable them), unless you want to read a usb key or something.

This was the point of the original menu, I think - it allowed each partition type to have a default based on arch, but to hide away the mess of other types unless you feel like overriding it.

You'll want to make sure in your patch that arches other than x86 don't lose their own native partitioning types :)

Signature · 1 line
Calvin Walton <[email protected]>
#12 lore raw
Quoted 21 lines · On Mon, 28 Jul 2008 18:02:20 -0400 Calvin Walton wrote:
Quoted 11 lines · Robert P. J. Day

On Mon, 28 Jul 2008, Randy Dunlap wrote:
it strikes me that, at least on x86, MSDOS partition support is so fundamental that it should take work for someone to turn it *off*. perhaps simply have it on by default, and force someone to go under "Configure standard kernel features (for small systems)" (CONFIG_EMBEDDED) to make it go away?

seriously, how often is someone going to build a kernel for x86 and
not need MSDOS partition support? just curious.

rday

Naturally, on an architecture other than x86 (e.g. sparc) you'll want to ensure that the platform's native partitioning format (for sparc, SUN_PARTITION) is similarly on by default, and difficult to unselect.

In this case, you could get by perfectly without msdos partitions enabled (although the default is still to enable them), unless you want to read a usb key or something.

Quoted 6 lines

This was the point of the original menu, I think - it allowed each partition type to have a default based on arch, but to hide away the mess of other types unless you feel like overriding it.

You'll want to make sure in your patch that arches other than x86 don't lose their own native partitioning types :)

Thanks. I won't bother pushing the latest patch. :)

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

#13 lore raw
Quoted 23 lines · Randy Dunlap
Quoted 21 lines · On Mon, 28 Jul 2008 18:02:20 -0400 Calvin Walton wrote:
Quoted 11 lines · Robert P. J. Day

On Mon, 28 Jul 2008, Randy Dunlap wrote:
it strikes me that, at least on x86, MSDOS partition support is so fundamental that it should take work for someone to turn it *off*. perhaps simply have it on by default, and force someone to go under "Configure standard kernel features (for small systems)" (CONFIG_EMBEDDED) to make it go away?

seriously, how often is someone going to build a kernel for x86 and
not need MSDOS partition support? just curious.

rday

Naturally, on an architecture other than x86 (e.g. sparc) you'll want to ensure that the platform's native partitioning format (for sparc, SUN_PARTITION) is similarly on by default, and difficult to unselect.

In this case, you could get by perfectly without msdos partitions enabled (although the default is still to enable them), unless you want to read a usb key or something.

Quoted 8 lines
Quoted 6 lines

This was the point of the original menu, I think - it allowed each partition type to have a default based on arch, but to hide away the mess of other types unless you feel like overriding it.

You'll want to make sure in your patch that arches other than x86 don't lose their own native partitioning types :)

Thanks. I won't bother pushing the latest patch. :)

so, just to be clear, the consensus is to just leave it alone as it's more trouble than it's worth to do anything about?

rday

p.s. and don't get me started on that "CONFIG_EMBEDDED" menu. grrrrrr ...
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================

#14 lore raw
Quoted 29 lines · On Tue, 29 Jul 2008 06:36:09 -0400 (EDT) Robert P. J. Day wrote:
Quoted 27 lines · Randy Dunlap
Quoted 25 lines · On Mon, 28 Jul 2008 18:02:20 -0400 Calvin Walton wrote:
Quoted 11 lines · Robert P. J. Day

On Mon, 28 Jul 2008, Randy Dunlap wrote:
it strikes me that, at least on x86, MSDOS partition support is so fundamental that it should take work for someone to turn it *off*. perhaps simply have it on by default, and force someone to go under "Configure standard kernel features (for small systems)" (CONFIG_EMBEDDED) to make it go away?

seriously, how often is someone going to build a kernel for x86 and
not need MSDOS partition support? just curious.

rday

Naturally, on an architecture other than x86 (e.g. sparc) you'll want to ensure that the platform's native partitioning format (for sparc, SUN_PARTITION) is similarly on by default, and difficult to unselect.

In this case, you could get by perfectly without msdos partitions enabled (although the default is still to enable them), unless you want to read a usb key or something.

This was the point of the original menu, I think - it allowed each partition type to have a default based on arch, but to hide away the mess of other types unless you feel like overriding it.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

You'll want to make sure in your patch that arches other than x86 don't lose their own native partitioning types :)

Thanks. I won't bother pushing the latest patch. :)

so, just to be clear, the consensus is to just leave it alone as it's more trouble than it's worth to do anything about?

Probably.

I don't see the "if PARTITION_ADVANCED" block as being compatible with the need to have default partition types per $ARCH.
Do you see some way around that problem?

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

#15 lore raw
Quoted 10 lines · Randy Dunlap
Quoted 2 lines · On Tue, 29 Jul 2008 06:36:09 -0400 (EDT) Robert P. J. Day wrote:

so, just to be clear, the consensus is to just leave it alone as it's more trouble than it's worth to do anything about?

Probably.

I don't see the "if PARTITION_ADVANCED" block as being compatible with the need to have default partition types per $ARCH. Do you see some way around that problem?

not presently. and if i was going to invest more effort, i'd probably be more tempted to try to reorg the train wreck that is the "Kernel hacking" submenu, anyway.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================