The following fixes were required for me to compile 2.3.48 with LVM. -- Michael Marxmeier mike@msede.com --- linux/fs/partitions/check.c.orig Sun Feb 27 15:33:55 2000 +++ linux/fs/partitions/check.c Sun Feb 27 15:45:44 2000 @@ -71,6 +71,11 @@ NULL }; +#if defined CONFIG_BLK_DEV_LVM || defined CONFIG_BLK_DEV_LVM_MODULE +#include +void ( *lvm_hd_name_ptr) ( char *, int) = NULL; +#endif + /* * disk_name() is used by genhd.c and blkpg.c. * It formats the devicename of the indicated disk into @@ -149,6 +154,14 @@ sprintf(buf, "%s/c%dd%dp%d", maj, ctlr, disk, part); return buf; } +#if defined CONFIG_BLK_DEV_LVM || defined CONFIG_BLK_DEV_LVM_MODULE + if (hd->major == LVM_BLK_MAJOR) { + *buf = 0; + if ( lvm_hd_name_ptr != NULL) + ( lvm_hd_name_ptr) ( buf, minor); + return buf; + } +#endif if (part) sprintf(buf, "%s%c%d", maj, unit, part); else --- linux/fs/block_dev.c.orig Sun Feb 27 15:22:21 2000 +++ linux/fs/block_dev.c Sun Feb 27 15:22:52 2000 @@ -313,7 +313,7 @@ * since the vma has no handle. */ -static int block_fsync(struct file *filp, struct dentry *dentry) +int block_fsync(struct file *filp, struct dentry *dentry) { return fsync_dev(dentry->d_inode->i_rdev); } @@ -650,7 +650,7 @@ return ret; } -static int blkdev_close(struct inode * inode, struct file * filp) +int blkdev_close(struct inode * inode, struct file * filp) { return blkdev_put(inode->i_bdev, BDEV_FILE); } --- linux/kernel/ksyms.c.orig Sun Feb 27 15:23:10 2000 +++ linux/kernel/ksyms.c Sun Feb 27 15:48:58 2000 @@ -71,6 +71,10 @@ }; #endif +#ifdef CONFIG_BLK_DEV_LVM_MODULE +extern void (*lvm_hd_name_ptr) ( char*, int); +EXPORT_SYMBOL(lvm_hd_name_ptr); +#endif #ifdef CONFIG_KMOD EXPORT_SYMBOL(request_module); @@ -232,6 +236,7 @@ EXPORT_SYMBOL(page_follow_link); EXPORT_SYMBOL(page_symlink_inode_operations); EXPORT_SYMBOL(block_symlink); +EXPORT_SYMBOL(block_fsync); /* for stackable file systems (lofs, wrapfs, etc.) */ EXPORT_SYMBOL(add_to_page_cache); @@ -267,6 +272,7 @@ EXPORT_SYMBOL(sync_dev); EXPORT_SYMBOL(devfs_register_partitions); EXPORT_SYMBOL(blkdev_open); +EXPORT_SYMBOL(blkdev_close); EXPORT_SYMBOL(blkdev_get); EXPORT_SYMBOL(blkdev_put); EXPORT_SYMBOL(ioctl_by_bdev); --- linux/include/linux/fs.h.orig Sun Feb 27 15:24:13 2000 +++ linux/include/linux/fs.h Sun Feb 27 15:24:35 2000 @@ -796,6 +796,8 @@ extern struct block_device *bdget(dev_t); extern void bdput(struct block_device *); extern int blkdev_open(struct inode *, struct file *); +extern int blkdev_close(struct inode * inode, struct file * filp); +extern int block_fsync(struct file *filp, struct dentry *dentry); extern struct file_operations def_blk_fops; extern struct file_operations def_fifo_fops; extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); --- linux/include/linux/blk.h.orig Sun Feb 27 15:33:22 2000 +++ linux/include/linux/blk.h Sun Feb 27 15:33:39 2000 @@ -51,6 +51,7 @@ extern int xd_init(void); extern int mfm_init(void); extern int loop_init(void); +extern int lvm_init(void); extern int md_init(void); extern int ap_init(void); extern int ddv_init(void); --- linux/drivers/block/Config.in.orig Sun Feb 27 15:10:27 2000 +++ linux/drivers/block/Config.in Sun Feb 27 15:12:28 2000 @@ -205,6 +205,12 @@ if [ "$CONFIG_NET" = "y" ]; then tristate 'Network block device support' CONFIG_BLK_DEV_NBD fi + +tristate 'Logical volume manager (LVM) support' CONFIG_BLK_DEV_LVM N +if [ "$CONFIG_BLK_DEV_LVM" != "n" ]; then + bool ' LVM information in proc filesystem' CONFIG_LVM_PROC_FS Y +fi + bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD if [ "$CONFIG_BLK_DEV_MD" = "y" ]; then tristate ' Linear (append) mode' CONFIG_MD_LINEAR --- linux/drivers/block/ll_rw_blk.c.orig Sun Feb 27 15:32:36 2000 +++ linux/drivers/block/ll_rw_blk.c Sun Feb 27 15:32:57 2000 @@ -1239,6 +1239,9 @@ #ifdef CONFIG_SJCD sjcd_init(); #endif CONFIG_SJCD +#ifdef CONFIG_BLK_DEV_LVM + lvm_init(); +#endif #ifdef CONFIG_BLK_DEV_MD md_init(); #endif CONFIG_BLK_DEV_MD --- linux/drivers/block/lvm.c.orig Sun Feb 27 15:50:05 2000 +++ linux/drivers/block/lvm.c Sun Feb 27 15:50:18 2000 @@ -287,7 +287,7 @@ static char pv_name[NAME_LEN]; /* static char rootvg[NAME_LEN] = { 0, }; */ static uint lv_open = 0; -static const char *const lvm_name = LVM_NAME; +const char *const lvm_name = LVM_NAME; static int lock = 0; static int loadtime = 0; static uint vg_count = 0;