Skip to contentSkip to conversation

kernel 2.2.19 support

linux-lvm Jesus Manuel NAVARRO LOPEZ 5 participants 12 messages Oct 4, 2001 – Oct 11, 2001

lore
Share & tools
lore
#0 lore raw

Hi list:

Anyone knows if there's the intention to properly support kernel 2.2.19? There're neither explicit raw-io patches nor lvm ones.

Other question. Why raw-io patch is needed within kernel 2.2 series?

Signature · 5 lines
SALUD,
Jes�s
***
[email protected]
***
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jesus" == Jesus Manuel NAVARRO LOPEZ <[email protected]> writes:

Jesus> Hi list: Anyone knows if there's the intention to properly Jesus> support kernel 2.2.19? There're neither explicit raw-io Jesus> patches nor lvm ones.

Just use the 2.2.18 one,

Sincerely,

Adrian Phillips

Signature · 3 lines
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]
#2 lore raw

Hi, Adrian:

Quoted 9 lines · Adrian Phillips
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Jesus" == Jesus Manuel NAVARRO LOPEZ <[email protected]> writes:

Jesus> Hi list: Anyone knows if there's the intention to properly Jesus> support kernel 2.2.19? There're neither explicit raw-io Jesus> patches nor lvm ones.

Just use the 2.2.18 one,

Well, Adrian, that's what I'm doing... to no avail. As I told in a previous post, though patches apply cleanly, compilation fails because "de" member on lvm_gendisk.part[MINOR(lv_ptr->lv.dev)].de is not defined.

Signature · 5 lines
SALUD,
Jes�s
***
[email protected]
***
#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jesus" == Jesus Manuel NAVARRO LOPEZ <[email protected]> writes:

Jesus> Hi, Adrian:
Jesus> Adrian Phillips wrote:
>> >>>>> "Jesus" == Jesus Manuel NAVARRO LOPEZ
>> <[email protected]> writes:
>>
Jesus> Hi list: Anyone knows if there's the intention to properly Jesus> support kernel 2.2.19? There're neither explicit raw-io Jesus> patches nor lvm ones.
>> Just use the 2.2.18 one,
>>
Jesus> Well, Adrian, that's what I'm doing... to no avail. As I Jesus> told in a previous post, though patches apply cleanly, Jesus> compilation fails because "de" member on

Ah, sorry, you're talking about a newer lvm, I'm still using 0.9.1beta7. I couldn't quite follow your previous mails but are you saying that the raw-io patch is the one causing problems ?

Sincerely,

Adrian Phillips

Signature · 3 lines
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]
#4 lore raw

Hi Again:

Quoted 1 line · Adrian Phillips

[...]

Quoted 6 lines

Ah, sorry, you're talking about a newer lvm, I'm still using 0.9.1beta7. I couldn't quite follow your previous mails but are you saying that the raw-io patch is the one causing problems ?

Sincerely,

I'm trying now lvm-1.0.1rc4 onto kernel 2.2.19
Raw-io patch applied is that for 2.2.18 (I tested both with that from kernel.org, and the one provided within the lvm tar). I don't know if the problem comes from raw-io or lvm itself (I don't even know why or when raw-io patch is needed on 2.2 kernel series). What I can say is that the problem shows up in the making modules phase at the lvm.c file. It is used there an struct member that doesn't seem to be defined anywhere else.

I imagine it can be either a "real" bug/incompatibility with kernel 2.2.19, or one resulting from bad patching (even though both patches -that for raw-io and the one for lvm, applied cleanly).

I only tested (succesfully) kernel 2.2.18 with lvm 1.0, and (failed) kernel 2.2.19 agains lvm-1.0.1rc3 & 4; this evening I will try 2.2.19 against 1.0 to see what happens.

Signature · 5 lines
SALUD,
Jes�s
***
[email protected]
***
#5 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jesus" == Jesus Manuel NAVARRO LOPEZ <[email protected]> writes:

Jesus> I'm trying now lvm-1.0.1rc4 onto kernel 2.2.19 Raw-io patch Jesus> applied is that for 2.2.18 (I tested both with that from Jesus> kernel.org, and the one provided within the lvm tar). I Jesus> don't know if the problem comes from raw-io or lvm itself Jesus> (I don't even know why or when raw-io patch is needed on Jesus> 2.2 kernel series). What I can say is that the problem Jesus> shows up in the making modules phase at the lvm.c file. It Jesus> is used there an struct member that doesn't seem to be Jesus> defined anywhere else.

Okay, calling LVM developers (or anyone else with more clue than me :-). I've tried this myself :-

- linux 2.2.19
- reiserfs
- linux-2.2.18-rawio.patch
- lvm-1.0.1-rc4-2.2.19.patch

cc -D__KERNEL__ -I/mirrors/linux/linux-2.2.19/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 -DMODULE -DMODVERSIONS -include /mirrors/linux/linux-2.2.19/include/linux/modversions.h -c -o lvm.o lvm.c
lvm.c: In function `lvm_do_lv_create':
lvm.c:2192: structure has no member named `de'
{standard input}: Assembler messages:
{standard input}:9: Warning: Ignoring changed section attributes for .modinfo lvm.c: In function `lvm_do_lv_remove':
lvm.c:2277: structure has no member named `de'
make[3]: *** [lvm.o] Error 1

Note the change in hd_struct in include/linux/genhd.c between 2.2.19 and 2.4.xxx :-

# 2.2.19

struct hd_struct {
	long start_sect;
	long nr_sects;
	int type;		/* RAID or normal */
};

# 2.4.0-test12

struct hd_struct {
	long start_sect;
	long nr_sects;
	devfs_handle_t de;              /* primary (master) devfs entry  */
};

So de is being set to the devfs_handle_t returned by lvm_fs_create_lv and this doesn't exist in 2.2.19. So what needs to be set in 2.2 ?

What has been changed between 0.9.1beta7 (or later) and 1.0.1rc4 ?

I'll send this now and have a look (in CVS as well) to see if I can anything obvious but not being a kernel hacker I am unsure of what is required.

Thanks for any help,

Sincerely,

Adrian Phillips

Signature · 3 lines
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]
#6 lore raw
Quoted 12 lines · Adrian Phillips

Jesus Manuel NAVARRO LOPEZ <[email protected]> writes:
Note the change in hd_struct in include/linux/genhd.c between 2.2.19 and 2.4.xxx :-

# 2.2.19

struct hd_struct {
	long start_sect;
	long nr_sects;
	int type;		/* RAID or normal */
};

# 2.4.0-test12

Quoted 8 lines
struct hd_struct {
	long start_sect;
	long nr_sects;
	devfs_handle_t de;              /* primary (master) devfs entry  */
};

So de is being set to the devfs_handle_t returned by lvm_fs_create_lv and this doesn't exist in 2.2.19. So what needs to be set in 2.2 ?

What you need to do to "properly" fix this is add a lines like

#if LINUX_VERSION_CODE > KERNEL_VERSION ( 2, 3, X)
	foo.de = bar;

#endif

around the two offending code sections, and find the appropriate kernel version where this entry was added. This can be done by looking at the kernel CVS:

                http://lxr.linux.no/

(best to start by checking if it is in 2.4.0, or a recent addition, and then going back through 2.3.X kernels).

Send the resulting patch back to the list.

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

#7 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andreas" == Andreas Dilger <[email protected]> writes:

Andreas> What you need to do to "properly" fix this is add a lines Andreas> like

Andreas> #if LINUX_VERSION_CODE > KERNEL_VERSION ( 2, 3, X) foo.de Andreas> = bar; #endif

Andreas> around the two offending code sections, and find the Andreas> appropriate kernel version where this entry was added. Andreas> This can be done by looking at the kernel CVS:
Andreas> http://lxr.linux.no/

Yes, but what concerned me was if there was some equivalent for 2.2 (foo.dev22 = bar). I was going to check the LVM CVS to see what changes had been done but was unable to login :-

bash-2.03$ cvs -d :pserver:[email protected]:/data/cvs login
Logging in to :pserver:[email protected]:2401/data/cvs
CVS password:
cvs login: authorization failed: server cvs.globalfilesystem.org rejected access to /data/cvs for user cvs

I did this according to the LVM CVS page,

Sincerely,

Adrian Phillips

Signature · 3 lines
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]
#8 lore raw
Quoted 3 lines · Adrian Phillips

Yes, but what concerned me was if there was some equivalent for 2.2 (foo.dev22 = bar). I was going to check the LVM CVS to see what changes had been done but was unable to login :-

It was just added recently (probably a devfs thing). Before that, it just ran the "lvm_fs_setup()" (or whatever) function, and didn't do anything with the output. Hmm, that means my suggestion may be broken.

Need something like:

#if LINUX_KERNEL_VERSION > KERNEL_VERSION (2, 3, 38)
foo.de =

#endif
		lvm_fs_setup();

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

#9 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andreas" == Andreas Dilger <[email protected]> writes:

Andreas> On Oct 04, 2001 19:18 +0200, Adrian Phillips wrote:
>> Yes, but what concerned me was if there was some equivalent for >> 2.2 (foo.dev22 = bar). I was going to check the LVM CVS to see >> what changes had been done but was unable to login :-

Andreas> It was just added recently (probably a devfs thing). Andreas> Before that, it just ran the "lvm_fs_setup()" (or Andreas> whatever) function, and didn't do anything with the Andreas> output. Hmm, that means my suggestion may be broken.

Andreas> Need something like:

Andreas> #if LINUX_KERNEL_VERSION > KERNEL_VERSION (2, 3, 38) Andreas> foo.de = #endif lvm_fs_setup();

Great thanks for the help. I'll have a look at the weekend. It anyone else with troubles wants to beat me to it, be my guest :-)

Sincerely,

Adrian Phillips

Signature · 3 lines
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]
#10 lore raw
In reply to Andreas Dilger
Quoted 9 lines · Andreas Dilger
Quoted 3 lines · Adrian Phillips

Yes, but what concerned me was if there was some equivalent for 2.2 (foo.dev22 = bar). I was going to check the LVM CVS to see what changes had been done but was unable to login :-

It was just added recently (probably a devfs thing). Before that, it just ran the "lvm_fs_setup()" (or whatever) function, and didn't do anything with the output. Hmm, that means my suggestion may be broken.

Quoted 7 lines

Need something like:

#if LINUX_KERNEL_VERSION > KERNEL_VERSION (2, 3, 38)
foo.de =

#endif
		lvm_fs_setup();

You'll need a bit more than that... :-)

I've fixed it in CVS now anyway - it works on 2.2 again.

patrick

#11 lore raw
In reply to Andreas Dilger
Quoted 4 lines · Andreas Dilger

What you need to do to "properly" fix this is add a lines like

#if LINUX_VERSION_CODE > KERNEL_VERSION ( 2, 3, X)
	foo.de = bar;
Quoted 8 lines

#endif

around the two offending code sections, and find the appropriate kernel version where this entry was added. This can be done by looking at the kernel CVS:

                http://lxr.linux.no/

(best to start by checking if it is in 2.4.0, or a recent addition, and then going back through 2.3.X kernels).

devfs was added in 2.3.48