All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64
@ 2001-11-30 10:47 Rich Scheller
  2001-11-30 12:15 ` Patrick Caulfield
  2001-12-03  2:34 ` Patrick Caulfield
  0 siblings, 2 replies; 8+ messages in thread
From: Rich Scheller @ 2001-11-30 10:47 UTC (permalink / raw)
  To: linux-lvm

I just tried to build a generic 2.4.16 kernel with lvm-1.0.1 patches on a
Sun Enterprise 250, following the directions in lvm_1.0.1.tar.gz.  I got
an error in the SPARC 64/32-bit ioctl conversion code.  Does anyone have
any ideas on how to proceed?  Is LVM even supported on SPARC64 platforms?

Here's the compile error:

sparc64-linux-gcc -D__KERNEL__ -I/usr/src/linux-2.4.16/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -m64 -pipe -mno-fpu -mcpu=ultrasparc
-mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
-Wa,--undeclared-regs    -c -o ioctl32.o ioctl32.c
ioctl32.c: In function `do_lvm_ioctl':
ioctl32.c:2636: warning: assignment makes pointer from integer without a cast
ioctl32.c:2670: structure has no member named `inode'
ioctl32.c:2711: warning: assignment from incompatible pointer type
ioctl32.c:2712: structure has no member named `inode'
ioctl32.c:2719: structure has no member named `inode'
ioctl32.c:2732: structure has no member named `inode'
ioctl32.c:2611: warning: `v' might be used uninitialized in this function
make[1]: *** [ioctl32.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.16/arch/sparc64/kernel'
make: *** [_dir_arch/sparc64/kernel] Error 2


-- 
Rich Scheller    Build Strategy and Infrastructure Group
IBM SWG          rschelle@us.ibm.com
(Tivoli)         Voice: 512-436-8563  Tie-Line: 749-8563

    The love of Lotus Notes is the root of all evil.

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

* Re: [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64
  2001-11-30 10:47 [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64 Rich Scheller
@ 2001-11-30 12:15 ` Patrick Caulfield
  2001-12-03  2:34 ` Patrick Caulfield
  1 sibling, 0 replies; 8+ messages in thread
From: Patrick Caulfield @ 2001-11-30 12:15 UTC (permalink / raw)
  To: linux-lvm

On Fri, Nov 30, 2001 at 10:49:29AM -0600, Rich Scheller wrote:
> I just tried to build a generic 2.4.16 kernel with lvm-1.0.1 patches on a
> Sun Enterprise 250, following the directions in lvm_1.0.1.tar.gz.  I got
> an error in the SPARC 64/32-bit ioctl conversion code.  Does anyone have
> any ideas on how to proceed?  Is LVM even supported on SPARC64 platforms?

It certainly was working so it looks like some inconsistencies have crept in.
You should be able to remove all references to the inode member in ioctl32.c and
it will work.

As I don't have an UltraSPARC to test it on can you let me know whether it does
work please(!) - though I'm fairly sure it will.
 
patrick

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

* Re: [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64
  2001-11-30 10:47 [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64 Rich Scheller
  2001-11-30 12:15 ` Patrick Caulfield
@ 2001-12-03  2:34 ` Patrick Caulfield
  2001-12-03  9:34   ` Rich Scheller
  1 sibling, 1 reply; 8+ messages in thread
From: Patrick Caulfield @ 2001-12-03  2:34 UTC (permalink / raw)
  To: linux-lvm

On Fri, Nov 30, 2001 at 10:49:29AM -0600, Rich Scheller wrote:
> I just tried to build a generic 2.4.16 kernel with lvm-1.0.1 patches on a
> Sun Enterprise 250, following the directions in lvm_1.0.1.tar.gz.  I got
> an error in the SPARC 64/32-bit ioctl conversion code.  Does anyone have
> any ideas on how to proceed?  Is LVM even supported on SPARC64 platforms?

Here's a proper patch. 

patrick

--- arch/sparc64/kernel/ioctl32.c.orig	Mon Dec  3 08:34:04 2001
+++ arch/sparc64/kernel/ioctl32.c	Mon Dec  3 08:33:33 2001
@@ -2667,7 +2667,7 @@
 				}
 
 				
-				v->pv[i]->pe = NULL; v->pv[i]->inode = NULL;
+				v->pv[i]->pe = NULL; v->pv[i]->bd = NULL;
 			}
 		}
 		if (!err) {
@@ -2709,14 +2709,14 @@
 		u.lv_bydev.lv = get_lv_t(ptr, &err);
 		if (err) return err;
 		u.lv_bydev.lv = &p;
-		p.pe = NULL; p.inode = NULL;		
+		p.pe = NULL; p.bd = NULL;		
 		break;		
 	case VG_EXTEND:
 		err = copy_from_user(&p, (void *)arg, sizeof(pv32_t) - 8 - UUID_LEN+1);
 		if (err) return -EFAULT;
 		err = copy_from_user(p.pv_uuid, ((pv32_t *)arg)->pv_uuid, UUID_LEN+1);
 		if (err) return -EFAULT;
-		p.pe = NULL; p.inode = NULL;
+		p.pe = NULL; p.bd = NULL;
 		karg = &p;
 		break;
 	case PV_CHANGE:
@@ -2729,7 +2729,7 @@
 		if (cmd == PV_CHANGE) {
 			err = copy_from_user(&p, (void *)A(ptr), sizeof(pv32_t) - 8 - UUID_LEN+1);
 			if (err) return -EFAULT;
-			p.pe = NULL; p.inode = NULL;
+			p.pe = NULL; p.bd = NULL;
 		}
 		break;
 	}

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

* Re: [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64
  2001-12-03  2:34 ` Patrick Caulfield
@ 2001-12-03  9:34   ` Rich Scheller
  2001-12-03 10:42     ` Patrick Caulfield
  0 siblings, 1 reply; 8+ messages in thread
From: Rich Scheller @ 2001-12-03  9:34 UTC (permalink / raw)
  To: linux-lvm

This patch fixed the kernel build break.  Thanks!

On Mon, 3 Dec 2001, Patrick Caulfield wrote:

> On Fri, Nov 30, 2001 at 10:49:29AM -0600, Rich Scheller wrote:
> > I just tried to build a generic 2.4.16 kernel with lvm-1.0.1 patches on a
> > Sun Enterprise 250, following the directions in lvm_1.0.1.tar.gz.  I got
> > an error in the SPARC 64/32-bit ioctl conversion code.  Does anyone have
> > any ideas on how to proceed?  Is LVM even supported on SPARC64 platforms?
> 
> Here's a proper patch. 
> 
> patrick
> 
> --- arch/sparc64/kernel/ioctl32.c.orig	Mon Dec  3 08:34:04 2001
> +++ arch/sparc64/kernel/ioctl32.c	Mon Dec  3 08:33:33 2001
> @@ -2667,7 +2667,7 @@
>  				}
>  
>  				
> -				v->pv[i]->pe = NULL; v->pv[i]->inode = NULL;
> +				v->pv[i]->pe = NULL; v->pv[i]->bd = NULL;
>  			}
>  		}
>  		if (!err) {
> @@ -2709,14 +2709,14 @@
>  		u.lv_bydev.lv = get_lv_t(ptr, &err);
>  		if (err) return err;
>  		u.lv_bydev.lv = &p;
> -		p.pe = NULL; p.inode = NULL;		
> +		p.pe = NULL; p.bd = NULL;		
>  		break;		
>  	case VG_EXTEND:
>  		err = copy_from_user(&p, (void *)arg, sizeof(pv32_t) - 8 - UUID_LEN+1);
>  		if (err) return -EFAULT;
>  		err = copy_from_user(p.pv_uuid, ((pv32_t *)arg)->pv_uuid, UUID_LEN+1);
>  		if (err) return -EFAULT;
> -		p.pe = NULL; p.inode = NULL;
> +		p.pe = NULL; p.bd = NULL;
>  		karg = &p;
>  		break;
>  	case PV_CHANGE:
> @@ -2729,7 +2729,7 @@
>  		if (cmd == PV_CHANGE) {
>  			err = copy_from_user(&p, (void *)A(ptr), sizeof(pv32_t) - 8 - UUID_LEN+1);
>  			if (err) return -EFAULT;
> -			p.pe = NULL; p.inode = NULL;
> +			p.pe = NULL; p.bd = NULL;
>  		}
>  		break;
>  	}
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
> 

-- 
Rich Scheller    Build Strategy and Infrastructure Group
IBM SWG          rschelle@us.ibm.com
(Tivoli)         Voice: 512-436-8563  Tie-Line: 749-8563

    The love of Lotus Notes is the root of all evil.

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

* Re: [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64
  2001-12-03  9:34   ` Rich Scheller
@ 2001-12-03 10:42     ` Patrick Caulfield
  2001-12-04 15:49       ` [linux-lvm] lvm-1.0.1 tools build error on SPARC64 (was: lvm-1.0.1 kernel compile errors on SPARC64) Rich Scheller
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Caulfield @ 2001-12-03 10:42 UTC (permalink / raw)
  To: linux-lvm

On Mon, Dec 03, 2001 at 09:36:04AM -0600, Rich Scheller wrote:
> This patch fixed the kernel build break.  Thanks!
> 

If that actually works (and I can think of no reason why it would not) can you
let me know and I'll send the patch to Dave Miller for inclusion in the stock
kernel.

Thanks,

patrick

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

* [linux-lvm] lvm-1.0.1 tools build error on SPARC64 (was: lvm-1.0.1 kernel compile errors on SPARC64)
  2001-12-03 10:42     ` Patrick Caulfield
@ 2001-12-04 15:49       ` Rich Scheller
  2001-12-05 10:06         ` Patrick Caulfield
  0 siblings, 1 reply; 8+ messages in thread
From: Rich Scheller @ 2001-12-04 15:49 UTC (permalink / raw)
  To: linux-lvm

On Mon, 3 Dec 2001, Patrick Caulfield wrote:

> On Mon, Dec 03, 2001 at 09:36:04AM -0600, Rich Scheller wrote:
> > This patch fixed the kernel build break.  Thanks!
> > 
> 
> If that actually works (and I can think of no reason why it would not) can you
> let me know and I'll send the patch to Dave Miller for inclusion in the stock
> kernel.

Patrick,

Yes, using that patch, I was able to build a working 2.4.16+lvm_1.0.1
kernel on our Sun Enterprise 250 and (after running into an LVM tools
build problem, see below) I was able to build some test volume groups and
volumes, create ext2 file systems on them, fill them with data, extend the
file systems, etc.  If you have any specific tests that you'd like me to
run, please let me know.  (My eventual goal is to create XFS or JFS file
systems in LVM volumes on top of a software RAID5 array running under
Linux on a Sun E450.)

After getting the kernel working, I ran into a completely different
problem in the build of the lvm-1.0.1 tools.  The configure script created
the file make.tmpl with CFLAGS set to "-g -O0 -Wall -pg".  The -pg
(profiling) option is incompatible with shared libraries on the gcc SPARC
compiler.  You get a whole bunch of these warnings:

cc1: warning: -fPIC and profiling conflict: disabling -fPIC

With -fPIC (Position Independant Code) disabled, the shared library
liblvm-10.so.1 is generated, but it's unusable.  Any executable linked
against this library gets a segmentation fault when the first function
from this library is called.

I can't really think of a reason why you'd want to have profiling turned
on for production code, so may I suggest that the CFLAGS option "-pg" be
removed from the file make.tmpl.in?  That fixed the problem for me...

-Rich

-- 
Rich Scheller    Build Strategy and Infrastructure Group
IBM SWG          rschelle@us.ibm.com
(Tivoli)         Voice: 512-436-8563  Tie-Line: 749-8563

    The love of Lotus Notes is the root of all evil.

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

* Re: [linux-lvm] lvm-1.0.1 tools build error on SPARC64 (was: lvm-1.0.1 kernel compile errors on SPARC64)
  2001-12-04 15:49       ` [linux-lvm] lvm-1.0.1 tools build error on SPARC64 (was: lvm-1.0.1 kernel compile errors on SPARC64) Rich Scheller
@ 2001-12-05 10:06         ` Patrick Caulfield
  2001-12-07  2:30           ` Patrick Caulfield
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Caulfield @ 2001-12-05 10:06 UTC (permalink / raw)
  To: linux-lvm

On Tue, Dec 04, 2001 at 03:50:57PM -0600, Rich Scheller wrote:
> On Mon, 3 Dec 2001, Patrick Caulfield wrote:
> 
> > On Mon, Dec 03, 2001 at 09:36:04AM -0600, Rich Scheller wrote:
> > > This patch fixed the kernel build break.  Thanks!
> > > 
> > 
> > If that actually works (and I can think of no reason why it would not) can you
> > let me know and I'll send the patch to Dave Miller for inclusion in the stock
> > kernel.
> 
> Patrick,
> 
> Yes, using that patch, I was able to build a working 2.4.16+lvm_1.0.1
> kernel on our Sun Enterprise 250 and (after running into an LVM tools
> build problem, see below) I was able to build some test volume groups and
> volumes, create ext2 file systems on them, fill them with data, extend the
> file systems, etc.  If you have any specific tests that you'd like me to
> run, please let me know.  (My eventual goal is to create XFS or JFS file
> systems in LVM volumes on top of a software RAID5 array running under
> Linux on a Sun E450.)

Thanks for doing that, I'll get the patch off today. I tested the original
SPARC port pretty thoroughly so if the basics work the rest should be OK - barring
other bugs of course!

> After getting the kernel working, I ran into a completely different
> problem in the build of the lvm-1.0.1 tools.  The configure script created
> the file make.tmpl with CFLAGS set to "-g -O0 -Wall -pg".  The -pg
> (profiling) option is incompatible with shared libraries on the gcc SPARC
> compiler.  You get a whole bunch of these warnings:
> 
> cc1: warning: -fPIC and profiling conflict: disabling -fPIC
> 
> With -fPIC (Position Independant Code) disabled, the shared library
> liblvm-10.so.1 is generated, but it's unusable.  Any executable linked
> against this library gets a segmentation fault when the first function
> from this library is called.
> 
> I can't really think of a reason why you'd want to have profiling turned
> on for production code, so may I suggest that the CFLAGS option "-pg" be
> removed from the file make.tmpl.in?  That fixed the problem for me...

You're right, there's no reason that should be in the release Makefile - I'll
remove it, thanks for pointing it out.

patrick

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

* Re: [linux-lvm] lvm-1.0.1 tools build error on SPARC64 (was: lvm-1.0.1 kernel compile errors on SPARC64)
  2001-12-05 10:06         ` Patrick Caulfield
@ 2001-12-07  2:30           ` Patrick Caulfield
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick Caulfield @ 2001-12-07  2:30 UTC (permalink / raw)
  To: linux-lvm

On Wed, Dec 05, 2001 at 08:37:56AM +0000, Patrick Caulfield wrote:
> On Tue, Dec 04, 2001 at 03:50:57PM -0600, Rich Scheller wrote:
> > On Mon, 3 Dec 2001, Patrick Caulfield wrote:
> > 
> > > On Mon, Dec 03, 2001 at 09:36:04AM -0600, Rich Scheller wrote:
> > > > This patch fixed the kernel build break.  Thanks!
> > > > 

The patch was included in 2.4.17pre5

patrick

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

end of thread, other threads:[~2001-12-07  2:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-30 10:47 [linux-lvm] lvm-1.0.1 patch causes kernel compile errors on SPARC64 Rich Scheller
2001-11-30 12:15 ` Patrick Caulfield
2001-12-03  2:34 ` Patrick Caulfield
2001-12-03  9:34   ` Rich Scheller
2001-12-03 10:42     ` Patrick Caulfield
2001-12-04 15:49       ` [linux-lvm] lvm-1.0.1 tools build error on SPARC64 (was: lvm-1.0.1 kernel compile errors on SPARC64) Rich Scheller
2001-12-05 10:06         ` Patrick Caulfield
2001-12-07  2:30           ` Patrick Caulfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.