2005-03-24 15:30:07

by Ed Cashin

[permalink] [raw]
Subject: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig


support configuration of AOE_PARTITIONS from Kconfig

Signed-off-by: Ed L. Cashin <[email protected]>

diff -uprN a/drivers/block/Kconfig b/drivers/block/Kconfig
--- a/drivers/block/Kconfig 2005-03-07 17:37:58.000000000 -0500
+++ b/drivers/block/Kconfig 2005-03-10 12:19:54.000000000 -0500
@@ -506,4 +506,19 @@ config ATA_OVER_ETH
This driver provides Support for ATA over Ethernet block
devices like the Coraid EtherDrive (R) Storage Blade.

+config AOE_PARTITIONS
+ int "Partitions per AoE device" if ATA_OVER_ETH
+ default "16"
+ help
+ The default is to support 16 partitions per aoe device. Some
+ systems lack good support for devices with large minor
+ numbers.
+
+ Such systems will be able to use more aoe disks when
+ AOE_PARTITIONS is set to one, but you won't be able to
+ partition the disks, and you must make sure your device
+ nodes are created to work with the value you select.
+
+ If unsure, use 16.
+
endmenu
diff -uprN a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
--- a/drivers/block/aoe/aoe.h 2005-03-10 12:19:27.000000000 -0500
+++ b/drivers/block/aoe/aoe.h 2005-03-10 12:19:54.000000000 -0500
@@ -6,8 +6,9 @@
/* set AOE_PARTITIONS to 1 to use whole-disks only
* default is 16, which is 15 partitions plus the whole disk
*/
-#ifndef AOE_PARTITIONS
-#define AOE_PARTITIONS 16
+#define AOE_PARTITIONS CONFIG_AOE_PARTITIONS
+#if AOE_PARTITIONS < 1
+#error AOE_PARTITIONS less than one
#endif

#define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * 10 + (aoeminor))


--
Ed L. Cashin <[email protected]>


2005-03-28 17:07:45

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

On Thu, Mar 24, 2005 at 07:21:28AM -0800, [email protected] wrote:
>
> support configuration of AOE_PARTITIONS from Kconfig
>
> Signed-off-by: Ed L. Cashin <[email protected]>
>
> diff -uprN a/drivers/block/Kconfig b/drivers/block/Kconfig
> --- a/drivers/block/Kconfig 2005-03-07 17:37:58.000000000 -0500
> +++ b/drivers/block/Kconfig 2005-03-10 12:19:54.000000000 -0500
> @@ -506,4 +506,19 @@ config ATA_OVER_ETH
> This driver provides Support for ATA over Ethernet block
> devices like the Coraid EtherDrive (R) Storage Blade.
>
> +config AOE_PARTITIONS
> + int "Partitions per AoE device" if ATA_OVER_ETH
> + default "16"
> + help
> + The default is to support 16 partitions per aoe device. Some
> + systems lack good support for devices with large minor
> + numbers.
> +
> + Such systems will be able to use more aoe disks when
> + AOE_PARTITIONS is set to one, but you won't be able to
> + partition the disks, and you must make sure your device
> + nodes are created to work with the value you select.
> +
> + If unsure, use 16.
> +

NACK. this changes devices nodes based on a compile-time option. Just
tell people to update their userland to a 2.6-copatible version.

2005-03-29 16:09:52

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

Christoph Hellwig <[email protected]> writes:

> On Thu, Mar 24, 2005 at 07:21:28AM -0800, [email protected] wrote:
>>
>> support configuration of AOE_PARTITIONS from Kconfig
>>
>> Signed-off-by: Ed L. Cashin <[email protected]>
>>
>> diff -uprN a/drivers/block/Kconfig b/drivers/block/Kconfig
>> --- a/drivers/block/Kconfig 2005-03-07 17:37:58.000000000 -0500
>> +++ b/drivers/block/Kconfig 2005-03-10 12:19:54.000000000 -0500
>> @@ -506,4 +506,19 @@ config ATA_OVER_ETH
>> This driver provides Support for ATA over Ethernet block
>> devices like the Coraid EtherDrive (R) Storage Blade.
>>
>> +config AOE_PARTITIONS
>> + int "Partitions per AoE device" if ATA_OVER_ETH
>> + default "16"
>> + help
>> + The default is to support 16 partitions per aoe device. Some
>> + systems lack good support for devices with large minor
>> + numbers.
>> +
>> + Such systems will be able to use more aoe disks when
>> + AOE_PARTITIONS is set to one, but you won't be able to
>> + partition the disks, and you must make sure your device
>> + nodes are created to work with the value you select.
>> +
>> + If unsure, use 16.
>> +
>
> NACK. this changes devices nodes based on a compile-time option.

I'm not sure I follow. This configuration option sets the number of
partitions per device in the driver. It doesn't create device nodes.

If the user has udev, then the device nodes are created correctly (on
Fedora Core 3), so that if the driver is configured with 1 partition
per device, the minor numbers for the disks are low.

The folks I've talked to who aren't using udev but want one partition
per device already know that they have to re-create their device
files.

> Just tell people to update their userland to a 2.6-copatible
> version.

Even if the glibc, coreutils, etc., get it right, some programs try to
parse the device node bits themselves and fail to find all the minor
number bits.

Making this configurable makes it possible for a debian sarge user or
a Slackware 10 user to run a 2.6.11 kernel and use up to 256 disks.
Even a Fedora Core 3 user has an mdadm that balks at minor numbers
like 1120. By using one partition per device, I can use FC3's mdadm
and have everything work.

The AoE users started doing this themselves, but this configuration
option allows non-C-programmers to do the same. It's helpful during
the transitional period and should be removed when the userland
software that people are actually running has caught up.

--
Ed L Cashin <[email protected]>

2005-03-29 16:25:13

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

On Tue, Mar 29, 2005 at 11:06:16AM -0500, Ed L Cashin wrote:
> >
> > NACK. this changes devices nodes based on a compile-time option.
>
> I'm not sure I follow. This configuration option sets the number of
> partitions per device in the driver. It doesn't create device nodes.
>
> If the user has udev, then the device nodes are created correctly (on
> Fedora Core 3), so that if the driver is configured with 1 partition
> per device, the minor numbers for the disks are low.
>
> The folks I've talked to who aren't using udev but want one partition
> per device already know that they have to re-create their device
> files.

It changes a kernel ABI, so people that have different config options
set can't use the same userland. It's a really big no-go.

2005-03-29 16:52:45

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

Christoph Hellwig <[email protected]> writes:

> On Tue, Mar 29, 2005 at 11:06:16AM -0500, Ed L Cashin wrote:
>> >
>> > NACK. this changes devices nodes based on a compile-time option.
>>
>> I'm not sure I follow. This configuration option sets the number of
>> partitions per device in the driver. It doesn't create device nodes.
>>
>> If the user has udev, then the device nodes are created correctly (on
>> Fedora Core 3), so that if the driver is configured with 1 partition
>> per device, the minor numbers for the disks are low.
>>
>> The folks I've talked to who aren't using udev but want one partition
>> per device already know that they have to re-create their device
>> files.
>
> It changes a kernel ABI, so people that have different config options
> set can't use the same userland. It's a really big no-go.

I don't know if it matters now that we have udev. When udev manages
the device nodes it all just works, so there's practically not much of
an issue. The UUIDs in Software RAID and LVM make this even less of
an issue. Besides, if they aren't using udev and are using a custom
kernel *and* using this configure option, then they're changing the
ABI on purpose for a practical benefit.

If you're saying that it's bad in principal, then that's another
story. If that's what you mean, then it's a Linux policy issue, and
to follow convention I'd think that we'd need another major number.
That would be like the partitionable md devices, etc.

To me, the latter seems like the uglier way to go, and it would be
more permanent, while the configure option seems ugly but convenient
for this transitional stage, and could go away when high minor numbers
are well supported on the systems currently in use.

--
Ed L Cashin <[email protected]>

2005-03-29 16:57:19

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

On Tue, Mar 29, 2005 at 11:48:48AM -0500, Ed L Cashin wrote:
> I don't know if it matters now that we have udev. When udev manages
> the device nodes it all just works,

But most peopel still don't use udev.

> If you're saying that it's bad in principal, then that's another
> story. If that's what you mean, then it's a Linux policy issue, and
> to follow convention I'd think that we'd need another major number.
> That would be like the partitionable md devices, etc.

Yes, it's a policy issue. We don't do this weird config option anywhere
else.

2005-04-07 18:46:21

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

Christoph Hellwig <[email protected]> writes:

> On Tue, Mar 29, 2005 at 11:48:48AM -0500, Ed L Cashin wrote:
>> I don't know if it matters now that we have udev. When udev manages
>> the device nodes it all just works,
>
> But most peopel still don't use udev.
>
>> If you're saying that it's bad in principal, then that's another
>> story. If that's what you mean, then it's a Linux policy issue, and
>> to follow convention I'd think that we'd need another major number.
>> That would be like the partitionable md devices, etc.
>
> Yes, it's a policy issue. We don't do this weird config option anywhere
> else.

A couple support calls later, I think I've come around to your point
of view. This patch isn't needed and may cause confusion.

Few aoe users really use partitions on their aoe disks, so I can make
the aoe driver have one minor number per disk as the default to avoid
the most common problems people encounter.

Then, aoe users who really need to partition their network disks can
use the partitionable md driver to "wrap" the aoe disk, like this:

mdadm -B -l linear --force -n 1 --auto=mdp /dev/md_p0 /dev/etherd/e7.0
fdisk /dev/md_p0


--
Ed L Cashin <[email protected]>

2005-04-07 18:50:18

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

On Thu, Apr 07, 2005 at 02:28:59PM -0400, Ed L Cashin wrote:
> Christoph Hellwig <[email protected]> writes:
>
> > On Tue, Mar 29, 2005 at 11:48:48AM -0500, Ed L Cashin wrote:
> >> I don't know if it matters now that we have udev. When udev manages
> >> the device nodes it all just works,
> >
> > But most peopel still don't use udev.
> >
> >> If you're saying that it's bad in principal, then that's another
> >> story. If that's what you mean, then it's a Linux policy issue, and
> >> to follow convention I'd think that we'd need another major number.
> >> That would be like the partitionable md devices, etc.
> >
> > Yes, it's a policy issue. We don't do this weird config option anywhere
> > else.
>
> A couple support calls later, I think I've come around to your point
> of view. This patch isn't needed and may cause confusion.
>
> Few aoe users really use partitions on their aoe disks, so I can make
> the aoe driver have one minor number per disk as the default to avoid
> the most common problems people encounter.
>
> Then, aoe users who really need to partition their network disks can
> use the partitionable md driver to "wrap" the aoe disk, like this:
>
> mdadm -B -l linear --force -n 1 --auto=mdp /dev/md_p0 /dev/etherd/e7.0
> fdisk /dev/md_p0

So, which one of the aoe patches listed at:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/
do you want me to drop? This one:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/aoe-AOE_PARTITIONS.patch
?
Or some other one too?

thanks,

greg k-h

2005-04-07 19:03:06

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

Greg KH <[email protected]> writes:

...
> So, which one of the aoe patches listed at:
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/
> do you want me to drop? This one:
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/aoe-AOE_PARTITIONS.patch
> ?
> Or some other one too?

Just aoe-AOE_PARTITIONS.patch, the seventh of the twelve, should be
dropped.

Then later I'll send a batch of patches that will include a change to
make aoe disks non-partitionable by default.

--
Ed L Cashin <[email protected]>

2005-04-08 00:10:41

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

On Thu, Apr 07, 2005 at 02:56:39PM -0400, Ed L Cashin wrote:
> Greg KH <[email protected]> writes:
>
> ...
> > So, which one of the aoe patches listed at:
> > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/
> > do you want me to drop? This one:
> > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/aoe-AOE_PARTITIONS.patch
> > ?
> > Or some other one too?
>
> Just aoe-AOE_PARTITIONS.patch, the seventh of the twelve, should be
> dropped.

Ok, dropped.

> Then later I'll send a batch of patches that will include a change to
> make aoe disks non-partitionable by default.

That's fine. Mind if I forward the other aoe patches in that directory
to Linus soon?

thanks,

greg k-h

2005-04-08 14:00:42

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH 2.6.11] aoe [7/12]: support configuration of AOE_PARTITIONS from Kconfig

Greg KH <[email protected]> writes:

> On Thu, Apr 07, 2005 at 02:56:39PM -0400, Ed L Cashin wrote:
...
>> Just aoe-AOE_PARTITIONS.patch, the seventh of the twelve, should be
>> dropped.
>
> Ok, dropped.
>
>> Then later I'll send a batch of patches that will include a change to
>> make aoe disks non-partitionable by default.
>
> That's fine. Mind if I forward the other aoe patches in that directory
> to Linus soon?

Go ahead. I have a new batch of patches to send, but it looks like I
might not get to it for a few days.

--
Ed L Cashin <[email protected]>