linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Re: 2.6.0-test1 on alpha : disk label numbering trouble
@ 2003-07-28 13:15 Andries.Brouwer
  2003-07-28 13:54 ` Ghozlane Toumi
  0 siblings, 1 reply; 5+ messages in thread
From: Andries.Brouwer @ 2003-07-28 13:15 UTC (permalink / raw)
  To: Andries.Brouwer, gtoumi, linux-kernel

	From: "Ghozlane Toumi" <gtoumi@laposte.net>

	> > I'm trying to run 2.6.0-test1 on an alpha box, 
	> > and  apparently, the osf partition numbering is wrong:

	2.4:
	 sda: sda3 sda4 sda5

	2.6:
	 sda: sda1 sda2 sda3

OK, I see what happened - viro changed things a little,
maybe by mistake.

I suppose the below will give you your original numbering again.
(Please confirm.)

Andries

--- osf.c~	Wed Mar  5 04:29:32 2003
+++ osf.c	Mon Jul 28 16:13:03 2003
@@ -67,9 +67,10 @@
 		if (slot == state->limit)
 		        break;
 		if (le32_to_cpu(partition->p_size))
-			put_partition(state, slot++,
+			put_partition(state, slot,
 				le32_to_cpu(partition->p_offset),
 				le32_to_cpu(partition->p_size));
+		slot++;
 	}
 	printk("\n");
 	put_dev_sector(sect);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Re: 2.6.0-test1 on alpha : disk label numbering trouble
  2003-07-28 13:15 [PATCH] Re: 2.6.0-test1 on alpha : disk label numbering trouble Andries.Brouwer
@ 2003-07-28 13:54 ` Ghozlane Toumi
  2003-07-28 21:45   ` [PATCH] sgi partitionning fix (Was: 2.6.0-test1 on alpha : disk label numbering trouble) Ghozlane Toumi
  0 siblings, 1 reply; 5+ messages in thread
From: Ghozlane Toumi @ 2003-07-28 13:54 UTC (permalink / raw)
  To: Andries.Brouwer, linux-kernel

From: <Andries.Brouwer@cwi.nl>

> 2.4:
> sda: sda3 sda4 sda5
>
> 2.6:
> sda: sda1 sda2 sda3
> 
> OK, I see what happened - viro changed things a little,
> maybe by mistake.
> 
> I suppose the below will give you your original numbering again.
> (Please confirm.)

yes, it works , thanks.
quickly checking viro's changes in this area, it seems other partitions
schemes are touched by the same problem...

> --- osf.c~ Wed Mar  5 04:29:32 2003
> +++ osf.c Mon Jul 28 16:13:03 2003
> @@ -67,9 +67,10 @@
>   if (slot == state->limit)
>           break;
>   if (le32_to_cpu(partition->p_size))
> - put_partition(state, slot++,
> + put_partition(state, slot,
>   le32_to_cpu(partition->p_offset),
>   le32_to_cpu(partition->p_size));
> + slot++;
>   }
>   printk("\n");
>   put_dev_sector(sect);

thanks,

ghoz


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] sgi partitionning fix (Was: 2.6.0-test1 on alpha : disk label numbering trouble)
  2003-07-28 13:54 ` Ghozlane Toumi
@ 2003-07-28 21:45   ` Ghozlane Toumi
  2003-07-28 23:09     ` Andries Brouwer
  0 siblings, 1 reply; 5+ messages in thread
From: Ghozlane Toumi @ 2003-07-28 21:45 UTC (permalink / raw)
  To: Andries.Brouwer, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

> quickly checking viro's changes in this area, it seems other partitions
> schemes are touched by the same problem...

I stand corrected. after looking a little bit deeper, the sun partition
has been corrected, the other are not touched.
However, I found out that sgi partitionning had this "renumbering"
issue even before viro's patch.
I don't know if this is correct, in any case this is an untested patch
that changes this behaviour for sgi partitions.
patch is attached because of dumb mailer.

thanks, 
ghoz




[-- Attachment #2: partition.diff --]
[-- Type: application/octet-stream, Size: 819 bytes --]

diff -Nr -U4 -X dontdiff linux-2.6.0-test1.orig/fs/partitions/sgi.c linux-2.6.0-test1/fs/partitions/sgi.c
--- linux-2.6.0-test1.orig/fs/partitions/sgi.c	Mon Jul 14 05:31:22 2003
+++ linux-2.6.0-test1/fs/partitions/sgi.c	Mon Jul 28 23:58:23 2003
@@ -29,9 +29,8 @@
 
 int sgi_partition(struct parsed_partitions *state, struct block_device *bdev)
 {
 	int i, csum, magic;
-	int slot = 1;
 	unsigned int *ui, start, blocks, cs;
 	Sector sect;
 	struct sgi_disklabel *label;
 	struct sgi_partition *p;
@@ -67,9 +66,9 @@
 	for(i = 0; i < 16; i++, p++) {
 		blocks = be32_to_cpu(p->num_blocks);
 		start  = be32_to_cpu(p->first_block);
 		if (blocks)
-			put_partition(state, slot++, start, blocks);
+			put_partition(state, i+1, start, blocks);
 	}
 	printk("\n");
 	put_dev_sector(sect);
 	return 1;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sgi partitionning fix (Was: 2.6.0-test1 on alpha : disk label numbering trouble)
  2003-07-28 21:45   ` [PATCH] sgi partitionning fix (Was: 2.6.0-test1 on alpha : disk label numbering trouble) Ghozlane Toumi
@ 2003-07-28 23:09     ` Andries Brouwer
  2003-07-29 11:00       ` Ghozlane Toumi
  0 siblings, 1 reply; 5+ messages in thread
From: Andries Brouwer @ 2003-07-28 23:09 UTC (permalink / raw)
  To: Ghozlane Toumi; +Cc: Andries.Brouwer, linux-kernel

On Mon, Jul 28, 2003 at 11:45:12PM +0200, Ghozlane Toumi wrote:

> However, I found out that sgi partitionning had this "renumbering"
> issue even before viro's patch.
> I don't know if this is correct, in any case this is an untested patch
> that changes this behaviour for sgi partitions.
> patch is attached because of dumb mailer.
> --------------------
>         for(i = 0; i < 16; i++, p++) {
>                 blocks = be32_to_cpu(p->num_blocks);
>                 start  = be32_to_cpu(p->first_block);
>                 if (blocks)
> -                       put_partition(state, slot++, start, blocks);
> +                       put_partition(state, i+1, start, blocks);
>         }
> --------------------

Hmm. The previous change was not because there is something
intrinsically good with some way of numbering partitions,
but because it is very inconvenient when partition numbering
changes.

Thus, the previous patch made OSF in 2.6 do as it did in 2.4.

But here the 2.6 behaviour is already that of 2.4.21, and you
change away from that. Not a good idea.

Andries


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sgi partitionning fix (Was: 2.6.0-test1 on alpha : disk label numbering trouble)
  2003-07-28 23:09     ` Andries Brouwer
@ 2003-07-29 11:00       ` Ghozlane Toumi
  0 siblings, 0 replies; 5+ messages in thread
From: Ghozlane Toumi @ 2003-07-29 11:00 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: linux-kernel

You wrote :
> On Mon, Jul 28, 2003 at 11:45:12PM +0200, Ghozlane Toumi wrote:
> 
> > However, I found out that sgi partitionning had this "renumbering"
> > issue even before viro's patch.
> > I don't know if this is correct, in any case this is an untested patch
> > that changes this behaviour for sgi partitions.
> > patch is attached because of dumb mailer.
> > --------------------
> >         for(i = 0; i < 16; i++, p++) {
> >                 blocks = be32_to_cpu(p->num_blocks);
> >                 start  = be32_to_cpu(p->first_block);
> >                 if (blocks)
> > -                       put_partition(state, slot++, start, blocks);
> > +                       put_partition(state, i+1, start, blocks);
> >         }
> > --------------------
> 
> Hmm. The previous change was not because there is something
> intrinsically good with some way of numbering partitions,
> but because it is very inconvenient when partition numbering
> changes.
Yes, you are right. It's just tht looking at similar paritionning code,
like osf, sun, ultrix, I didn't see/know why sgi would be different.
but I've never approached an sgi in my life and thus don't know
anything about irix partitionnnig uses.

> But here the 2.6 behaviour is already that of 2.4.21, and you
> change away from that. Not a good idea.

Agreed, obviously.

ghoz


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-07-29 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-28 13:15 [PATCH] Re: 2.6.0-test1 on alpha : disk label numbering trouble Andries.Brouwer
2003-07-28 13:54 ` Ghozlane Toumi
2003-07-28 21:45   ` [PATCH] sgi partitionning fix (Was: 2.6.0-test1 on alpha : disk label numbering trouble) Ghozlane Toumi
2003-07-28 23:09     ` Andries Brouwer
2003-07-29 11:00       ` Ghozlane Toumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).