linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] 2.5.34 ufs/super.c
  2002-09-09 20:47 [PATCH] 2.5.34 ufs/super.c Skip Ford
@ 2002-09-09 20:43 ` Linus Torvalds
  2002-09-10  1:42   ` Alexander Viro
  2002-09-10 17:43 ` Zwane Mwaikambo
  1 sibling, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2002-09-09 20:43 UTC (permalink / raw)
  To: Skip Ford, Alexander Viro; +Cc: linux-kernel


This patch is definitely correct, but on the other hand I really think
that the calling convention of sb_set_blocksize() is wrong, and instead of
returning "size for success or zero for failure ", it should return "error
code for failure or zero for success".

There's just no point to returning the same size we just passed in.

And making that calling convention the new one would make the current UFS
code be the _right_ one.

Al, comments? Why the strange calling convention?

		Linus

----
On Mon, 9 Sep 2002, Skip Ford wrote:
>
> I've needed this patch since 2.5.32 to successfully mount a UFS
> partition.
> 
> --- linux/fs/ufs/super.c~	Mon Sep  9 16:39:52 2002
> +++ linux/fs/ufs/super.c	Mon Sep  9 16:39:57 2002
> @@ -605,7 +605,7 @@
>  	}
>  	
>  again:	
> -	if (sb_set_blocksize(sb, block_size)) {
> +	if (!sb_set_blocksize(sb, block_size)) {
>  		printk(KERN_ERR "UFS: failed to set blocksize\n");
>  		goto failed;
>  	}
> 
> 


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

* [PATCH] 2.5.34 ufs/super.c
@ 2002-09-09 20:47 Skip Ford
  2002-09-09 20:43 ` Linus Torvalds
  2002-09-10 17:43 ` Zwane Mwaikambo
  0 siblings, 2 replies; 6+ messages in thread
From: Skip Ford @ 2002-09-09 20:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds

I've needed this patch since 2.5.32 to successfully mount a UFS
partition.

--- linux/fs/ufs/super.c~	Mon Sep  9 16:39:52 2002
+++ linux/fs/ufs/super.c	Mon Sep  9 16:39:57 2002
@@ -605,7 +605,7 @@
 	}
 	
 again:	
-	if (sb_set_blocksize(sb, block_size)) {
+	if (!sb_set_blocksize(sb, block_size)) {
 		printk(KERN_ERR "UFS: failed to set blocksize\n");
 		goto failed;
 	}

-- 
Skip

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

* Re: [PATCH] 2.5.34 ufs/super.c
  2002-09-09 20:43 ` Linus Torvalds
@ 2002-09-10  1:42   ` Alexander Viro
  2002-09-10  1:49     ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Viro @ 2002-09-10  1:42 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Skip Ford, linux-kernel



On Mon, 9 Sep 2002, Linus Torvalds wrote:

> 
> This patch is definitely correct, but on the other hand I really think
> that the calling convention of sb_set_blocksize() is wrong, and instead of
> returning "size for success or zero for failure ", it should return "error
> code for failure or zero for success".
> 
> There's just no point to returning the same size we just passed in.
> 
> And making that calling convention the new one would make the current UFS
> code be the _right_ one.
> 
> Al, comments? Why the strange calling convention?

No particulary good reason, except keeping calling convention the same for
sb_set_blocksize() and sb_min_blocksize()...


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

* Re: [PATCH] 2.5.34 ufs/super.c
  2002-09-10  1:42   ` Alexander Viro
@ 2002-09-10  1:49     ` Linus Torvalds
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Torvalds @ 2002-09-10  1:49 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Skip Ford, linux-kernel


On Mon, 9 Sep 2002, Alexander Viro wrote:
> 
> No particulary good reason, except keeping calling convention the same for
> sb_set_blocksize() and sb_min_blocksize()...

Ahh, that kind of makes sense. I'll apply the minimal patch from Skip (ie 
not change the current convention).

		Linus


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

* Re: [PATCH] 2.5.34 ufs/super.c
  2002-09-09 20:47 [PATCH] 2.5.34 ufs/super.c Skip Ford
  2002-09-09 20:43 ` Linus Torvalds
@ 2002-09-10 17:43 ` Zwane Mwaikambo
  2002-09-10 17:46   ` Skip Ford
  1 sibling, 1 reply; 6+ messages in thread
From: Zwane Mwaikambo @ 2002-09-10 17:43 UTC (permalink / raw)
  To: Skip Ford; +Cc: linux-kernel, torvalds

On Mon, 9 Sep 2002, Skip Ford wrote:

> I've needed this patch since 2.5.32 to successfully mount a UFS
> partition.
> 
> --- linux/fs/ufs/super.c~	Mon Sep  9 16:39:52 2002
> +++ linux/fs/ufs/super.c	Mon Sep  9 16:39:57 2002
> @@ -605,7 +605,7 @@
>  	}
>  	
>  again:	
> -	if (sb_set_blocksize(sb, block_size)) {
> +	if (!sb_set_blocksize(sb, block_size)) {
>  		printk(KERN_ERR "UFS: failed to set blocksize\n");
>  		goto failed;
>  	}

Good heavens! I introduced that bug when fixing another bug a while ago, i 
was pretty certain it got fixed (it got fixed in 2.4 and -dj(?))

	Zwane
-- 
function.linuxpower.ca


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

* Re: [PATCH] 2.5.34 ufs/super.c
  2002-09-10 17:43 ` Zwane Mwaikambo
@ 2002-09-10 17:46   ` Skip Ford
  0 siblings, 0 replies; 6+ messages in thread
From: Skip Ford @ 2002-09-10 17:46 UTC (permalink / raw)
  To: Zwane Mwaikambo; +Cc: Skip Ford, linux-kernel, torvalds

Zwane Mwaikambo wrote:
> On Mon, 9 Sep 2002, Skip Ford wrote:
> 
> > I've needed this patch since 2.5.32 to successfully mount a UFS
> > partition.
> > 
> > --- linux/fs/ufs/super.c~	Mon Sep  9 16:39:52 2002
> > +++ linux/fs/ufs/super.c	Mon Sep  9 16:39:57 2002
> > @@ -605,7 +605,7 @@
> >  	}
> >  	
> >  again:	
> > -	if (sb_set_blocksize(sb, block_size)) {
> > +	if (!sb_set_blocksize(sb, block_size)) {
> >  		printk(KERN_ERR "UFS: failed to set blocksize\n");
> >  		goto failed;
> >  	}
> 
> Good heavens! I introduced that bug when fixing another bug a while ago, i 
> was pretty certain it got fixed (it got fixed in 2.4 and -dj(?))

Here's the snippet from patch-2.5.32 that did it.  This just went in a
week or two ago.

-	sb_set_blocksize(sb, block_size);
+	if (sb_set_blocksize(sb, block_size)) {
+		printk(KERN_ERR "UFS: failed to set blocksize\n");
+		goto failed;
+	}

-- 
Skip

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

end of thread, other threads:[~2002-09-10 17:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-09 20:47 [PATCH] 2.5.34 ufs/super.c Skip Ford
2002-09-09 20:43 ` Linus Torvalds
2002-09-10  1:42   ` Alexander Viro
2002-09-10  1:49     ` Linus Torvalds
2002-09-10 17:43 ` Zwane Mwaikambo
2002-09-10 17:46   ` Skip Ford

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).