[prev in list] [next in list] [prev in thread] [next in thread]
List: evms-devel
Subject: Re: [Evms-devel] bk tree with evms for 2.4.19-pre4 and pre4-ac3
From: Kevin Corry <kcorry () austin ! rr ! com>
Date: 2002-04-05 4:21:35
[Download RAW message or body]
The patch below looks about right. Except the line in evms.c that is
replacing MKDEV() with mk_kdev(). I believe mk_kdev() is a 2.5-only function
to deal with the new device numbers.
The EXPORT_SYMBOL(root_device_name) was never in the standard 2.4 kernel (it
was an EVMS addition), but the removal of the root_device_name declaration
from fs.h should probably go to Marcelo. Strangely, after they made
root_device_name static in 2.5, they never bothered to take out the extern
declaration in fs.h (still haven't as of 2.5.7), so that one should probably
go to Linus as well.
-Kevin
On Thursday 04 April 2002 21:03, Ed Tomlinson wrote:
> On April 4, 2002 09:04 pm, Kevin Corry wrote:
> > > Suspect some code has to be removed from the driver and moved into
> > > do_mounts. not sure what though.
> >
> > This is the same thing that was done in 2.5. Looks like they have
> > back-ported some code. The EVMS code for 2.5 has the necessary changes,
> > so I will have to add those back to our 2.4 tree.
>
> Ahh. Thanks. How does this look? It builds but have have not tried
> booting with an evms volume as root...
>
> The removal of root_device_name from fs.h and ksyms.c probably should be
> pushed to marcelo. Thoughts?
>
> Ed
>
> # This is a BitKeeper generated patch for the following project:
> # Project Name: Linux kernel tree
> # This patch format is intended for GNU patch command version 2.5 or
> higher. # This patch includes the following deltas:
> # ChangeSet 1.311 -> 1.313
> # kernel/ksyms.c 1.51 -> 1.52
> # include/linux/fs.h 1.60 -> 1.61
> # init/do_mounts.c 1.16 -> 1.17
> # drivers/evms/evms.c 1.3 -> 1.4
> #
> # The following is the BitKeeper ChangeSet Log
> # --------------------------------------------
> # 02/04/04 ed@oscar.et.ca 1.312
> # do_mount update for pre5 (back ported from 2.5 code)
> # --------------------------------------------
> # 02/04/04 ed@oscar.et.ca 1.313
> # do_mount changes symbol removed
> # --------------------------------------------
> #
> diff -Nru a/drivers/evms/evms.c b/drivers/evms/evms.c
> --- a/drivers/evms/evms.c Thu Apr 4 21:55:11 2002
> +++ b/drivers/evms/evms.c Thu Apr 4 21:55:11 2002
> @@ -4810,20 +4810,28 @@
> */
> static void find_root_fs_dev(void)
> {
> +// This function will never get called if EVMS is built as a module, and
> +// adding this condition prevents having to add an EXPORT_SYMBOL()
> somewhere +// for get_root_device_name.
> +#ifndef MODULE
> + char root_name[64] = {0};
> char * name;
> int i;
>
> - if ( ! strncmp(root_device_name, EVMS_DIR_NAME "/",
> strlen(EVMS_DIR_NAME)+1) ) { - name =
> &root_device_name[strlen(EVMS_DIR_NAME)+1];
> + get_root_device_name(root_name);
> +
> + if ( ! strncmp(root_name, EVMS_DIR_NAME "/", strlen(EVMS_DIR_NAME)+1) ) {
> + name = &root_name[strlen(EVMS_DIR_NAME)+1];
>
> for ( i = 1; i <= MAX_EVMS_VOLUMES; i++ ) {
> if ( evms_logical_volumes[i].name &&
> - ! strncmp(name, evms_logical_volumes[i].name,
> strlen(evms_logical_volumes[i].name)) ) { - ROOT_DEV =
> MKDEV(EVMS_MAJOR,i);
> + ! strncmp(name, evms_logical_volumes[i].name,
> strlen(evms_logical_volumes[i].name)) ) { + ROOT_DEV =
> mk_kdev(EVMS_MAJOR,i);
> return;
> }
> }
> }
> +#endif
> }
>
> /*
> diff -Nru a/include/linux/fs.h b/include/linux/fs.h
> --- a/include/linux/fs.h Thu Apr 4 21:55:11 2002
> +++ b/include/linux/fs.h Thu Apr 4 21:55:11 2002
> @@ -1456,8 +1456,7 @@
> unsigned long generate_cluster(kdev_t, int b[], int);
> unsigned long generate_cluster_swab32(kdev_t, int b[], int);
> extern kdev_t ROOT_DEV;
> -extern char root_device_name[];
> -
> +extern void get_root_device_name( char * root_name );
>
> extern void show_buffers(void);
>
> diff -Nru a/init/do_mounts.c b/init/do_mounts.c
> --- a/init/do_mounts.c Thu Apr 4 21:55:11 2002
> +++ b/init/do_mounts.c Thu Apr 4 21:55:11 2002
> @@ -631,6 +631,11 @@
> mount_block_root("/dev/root", root_mountflags);
> }
>
> +void get_root_device_name( char * root_name )
> +{
> + strncpy(root_name, root_device_name, 63);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> static int do_linuxrc(void * shell)
> {
> diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
> --- a/kernel/ksyms.c Thu Apr 4 21:55:11 2002
> +++ b/kernel/ksyms.c Thu Apr 4 21:55:11 2002
> @@ -316,7 +316,6 @@
> EXPORT_SYMBOL(max_sectors);
> EXPORT_SYMBOL(max_readahead);
> EXPORT_SYMBOL(is_swap_partition);
> -EXPORT_SYMBOL(root_device_name);
>
> /* tty routines */
> EXPORT_SYMBOL(tty_hangup);
_______________________________________________
Evms-devel mailing list
Evms-devel@lists.sourceforge.net
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic