* [linux-lvm] more LVM 0.8 patches
@ 2000-10-22 14:22 Luca Berra
2000-10-23 13:08 ` Paul Jakma
2000-10-23 18:00 ` [linux-lvm] " Andreas Dilger
0 siblings, 2 replies; 6+ messages in thread
From: Luca Berra @ 2000-10-22 14:22 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
hello here are more lvm patches.
they apply over patches in lvm-0.8final-3.3.src.rpm
1st chunk is needed to compile on my system (mine only?? K6-2, kernel 2.4.0-test8, glibc 2.1.3, pgcc-2.95.3)
2nd chunk is nice for devfs
3rd chunk is NEEDED for lvm over raid
I am still missing something on the vgchange front, the binary version i saved
before trashing my whole system this summer works, the one built from
these sources doesn't.
Regards
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
[-- Attachment #2: LVM.DIFF --]
[-- Type: text/plain, Size: 1617 bytes --]
--- 0.8final/tools/lib/liblvm.h.bluca Fri Oct 20 00:22:27 2000
+++ 0.8final/tools/lib/liblvm.h Fri Oct 20 00:22:08 2000
@@ -70,7 +70,10 @@
#include <linux/major.h>
#include <linux/genhd.h>
+#include <stdint.h>
+#define __KERNEL__
#include <linux/lvm.h>
+#undef __KERNEL__
#ifndef uint8_t
# define uint8_t u_int8_t
--- 0.8final/tools/lib/lvm_dir_cache.c.bluca Fri Oct 20 00:22:27 2000
+++ 0.8final/tools/lib/lvm_dir_cache.c Fri Oct 20 00:22:08 2000
@@ -59,8 +59,8 @@
char major[20] = { 0, };
char minor[20] = { 0, };
char blocks[20] = { 0, };
- char devname[30] = { 0, };
- char procline[127] ;
+ char devname[127] = { 0, };
+ char procline[256] ;
static char *devdir[] = {
"/dev/ida",
"/dev/ide/hd",
--- 0.8final/tools/lib/pv_get_size.c.bluca Fri Oct 20 00:22:27 2000
+++ 0.8final/tools/lib/pv_get_size.c Fri Oct 20 00:22:08 2000
@@ -96,14 +96,18 @@
if ( dir_cache[i].st_rdev == st_rdev)
break;
}
+ memset ( disk_dev_name, 0, sizeof ( disk_dev_name));
+ strncpy ( disk_dev_name, dir_cache[i].dev_name, sizeof ( disk_dev_name) - 1);
+ } else {
+ memset ( disk_dev_name, 0, sizeof ( disk_dev_name));
+ strncpy ( disk_dev_name, dev_name, sizeof ( disk_dev_name) - 1);
+
}
} else {
ret = -LVM_EPV_GET_SIZE_LVM_DIR_CACHE;
goto pv_get_size_end;
}
- memset ( disk_dev_name, 0, sizeof ( disk_dev_name));
- strncpy ( disk_dev_name, dir_cache[i].dev_name, sizeof ( disk_dev_name) - 1);
first = 1;
if ( ( pv_handle = open ( disk_dev_name, O_RDONLY)) == -1) {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] more LVM 0.8 patches
2000-10-22 14:22 [linux-lvm] more LVM 0.8 patches Luca Berra
@ 2000-10-23 13:08 ` Paul Jakma
2000-10-23 18:00 ` [linux-lvm] " Andreas Dilger
1 sibling, 0 replies; 6+ messages in thread
From: Paul Jakma @ 2000-10-23 13:08 UTC (permalink / raw)
To: Luca Berra; +Cc: Andreas Dilger, linux-lvm
excellent...
this fixes the compile problem i had with the tools that i reported to
Andreas before (but i hadn't compiled the kernel, so he asked me to do
that).
successfully compiles against 2.4.0-test10-pre4, glibc-2.94, gcc-2.96.
regards,
paul jakma
On Sun, 22 Oct 2000, Luca Berra wrote:
> hello here are more lvm patches.
> they apply over patches in lvm-0.8final-3.3.src.rpm
> 1st chunk is needed to compile on my system (mine only?? K6-2, kernel 2.4.0-test8, glibc 2.1.3, pgcc-2.95.3)
> 2nd chunk is nice for devfs
> 3rd chunk is NEEDED for lvm over raid
>
> I am still missing something on the vgchange front, the binary version i saved
> before trashing my whole system this summer works, the one built from
> these sources doesn't.
>
> Regards
> L.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [linux-lvm] Re: more LVM 0.8 patches
2000-10-22 14:22 [linux-lvm] more LVM 0.8 patches Luca Berra
2000-10-23 13:08 ` Paul Jakma
@ 2000-10-23 18:00 ` Andreas Dilger
2000-10-24 16:25 ` Christoph Hellwig
2000-10-31 7:36 ` Luca Berra
1 sibling, 2 replies; 6+ messages in thread
From: Andreas Dilger @ 2000-10-23 18:00 UTC (permalink / raw)
To: bluca; +Cc: Andreas Dilger, linux-lvm
Luca Berra writes:
> hello here are more lvm patches.
> they apply over patches in lvm-0.8final-3.3.src.rpm
> 1st chunk is needed to compile on my system
Actually, this is a bit of a problem. In my 2.2 kernel patch, I include an
lvm.h that can be used for both user and kernel compiles, so that you are
sure you have the same IOP version, struct sizes, etc. However, this lvm.h
doesn't exist on 2.4.
I have never tried using my 2.2 lvm.h header to compile the 2.4 kernel. It
is mosly correct (I preserved _most_ of the 2.4 definitions and such), but
that wasn't my real goal (I was interested in a 2.2 header) so I doubt it
has everything.
If you are interested to do a bit of work, it would be good to take my 2.2
lvm.h and add the few missing "#if kernel 2.2 use this, #else use that"
checks and I will add it into my lvm.h so it can be used by everyone.
> 2nd chunk is nice for devfs
> 3rd chunk is NEEDED for lvm over raid
These look OK. I will add them into my patch.
> I am still missing something on the vgchange front, the binary version i
> saved before trashing my whole system this summer works, the one built from
> these sources doesn't.
What sort of symptoms are you having (sorry if you already posted them)?
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Re: more LVM 0.8 patches
2000-10-23 18:00 ` [linux-lvm] " Andreas Dilger
@ 2000-10-24 16:25 ` Christoph Hellwig
2000-10-24 18:47 ` Andreas Dilger
2000-10-31 7:36 ` Luca Berra
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2000-10-24 16:25 UTC (permalink / raw)
To: Andreas Dilger; +Cc: bluca, linux-lvm
On Mon, Oct 23, 2000 at 12:00:01PM -0600, Andreas Dilger wrote:
> Luca Berra writes:
> > hello here are more lvm patches.
> > they apply over patches in lvm-0.8final-3.3.src.rpm
> > 1st chunk is needed to compile on my system
>
> Actually, this is a bit of a problem. In my 2.2 kernel patch, I include an
> lvm.h that can be used for both user and kernel compiles, so that you are
> sure you have the same IOP version, struct sizes, etc. However, this lvm.h
> doesn't exist on 2.4.
IMHO this is the wrong thing. Userlevel tools should not include kernel headers.
IOP version mismatches are detected at run time.
In my RPMs I keep including the userlevel header and it works fine for Linux 2.2
and 2.4. The RPMs do also include most fixes by Andreas and from this list
(Luca's have just been added). If anyone is interested, they can be found on
ftp.openlinux.org:/pub/people/hch/lvm/lvm-tools-0.8final-5.src.rpm
ftp.openlinux.org:/pub/people/hch/lvm/lvm-tools-0.8final-5.i386.rpm (Glibc 2.1.94)
Christoph
--
Always remember that you are unique. Just like everyone else.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Re: more LVM 0.8 patches
2000-10-24 16:25 ` Christoph Hellwig
@ 2000-10-24 18:47 ` Andreas Dilger
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Dilger @ 2000-10-24 18:47 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andreas Dilger, bluca, linux-lvm
Christoph writes:
> > Actually, this is a bit of a problem. In my 2.2 kernel patch, I include an
> > lvm.h that can be used for both user and kernel compiles, so that you are
> > sure you have the same IOP version, struct sizes, etc. However, this lvm.h
> > doesn't exist on 2.4.
>
> IMHO this is the wrong thing. Userlevel tools should not include kernel
> headers. IOP version mismatches are detected at run time.
> In my RPMs I keep including the userlevel header and it works fine for
> Linux 2.2 and 2.4.
Actually, there IS a problem that isn't addressed by the IOP version,
probably because someone changed the lvm.h file after Heinz added it
to the kernel. In the lv_v2 struct (in the 2.4 kernel sources) the
"uint8 __unused" field was added after lv_block_exception_t, and this
was not reflected in a IOP version change. This field is NOT in the
lvm.h lv_v2 included in the 0.8final user tools.
That is why I chose to have a single lvm.h between user and kernel
space. I know that it is bad to include linux/*.h headers in user
tools, but I wanted the tools to compile properly with the header
in the current kernel.
*** If we at least make the header include/linux/lvm.h and tools/lib/lvm.h
exactly the same, it will make tracking changes a lot easier.
Better would be to have per-struct version numbers, or make the ioctl
numbers reflect the struct sizes (which is already part of the ioctl
definitions) we can track changes a lot easier, and allow backwards
compatibility when struct sizes change because they will get unique
ioctl numbers for the old and new interface.
Note that the user tools tarball that I have also includes the lvm.h
under tools/lib, I just don't use it. At most, you will need to change
#include <linux/lvm.h> to #include <lib/lvm.h> in lvm_user.h and liblvm.h.
If people agree that we should keep kernel and user headers totally
separate, I will change this for my next release.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
^ permalink raw reply [flat|nested] 6+ messages in thread
* [linux-lvm] Re: more LVM 0.8 patches
2000-10-23 18:00 ` [linux-lvm] " Andreas Dilger
2000-10-24 16:25 ` Christoph Hellwig
@ 2000-10-31 7:36 ` Luca Berra
1 sibling, 0 replies; 6+ messages in thread
From: Luca Berra @ 2000-10-31 7:36 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-lvm
On Mon, Oct 23, 2000 at 12:00:01PM -0600, Andreas Dilger wrote:
> If you are interested to do a bit of work, it would be good to take my 2.2
> lvm.h and add the few missing "#if kernel 2.2 use this, #else use that"
> checks and I will add it into my lvm.h so it can be used by everyone.
I will check into this eventually,
the problem is i don't work on linux full-time
so i hack into lvm whenever i have some spare time, or i am forced to do it.
> > I am still missing something on the vgchange front, the binary version i
> > saved before trashing my whole system this summer works, the one built from
> > these sources doesn't.
>
> What sort of symptoms are you having (sorry if you already posted them)?
just does not work, at the moment i have a single vg, and the machine
boots from it, so it is very difficult to debug. I should put gdb into my
initrd :)
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-10-31 7:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-22 14:22 [linux-lvm] more LVM 0.8 patches Luca Berra
2000-10-23 13:08 ` Paul Jakma
2000-10-23 18:00 ` [linux-lvm] " Andreas Dilger
2000-10-24 16:25 ` Christoph Hellwig
2000-10-24 18:47 ` Andreas Dilger
2000-10-31 7:36 ` Luca Berra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox