From 86775dce901935045c52cf0238b6c3a7230c769d Mon Sep 17 00:00:00 2001 From: johann Date: Fri, 5 Dec 2008 15:56:25 +0000 Subject: [PATCH] Branch b1_6 b=17490 i=bzzz i=kalpak correctly handle device paths using a subdirectory in /dev when creating the per-device procfs directory under /proc/fs/ldiskfs. --- ldiskfs/ChangeLog | 6 ++ .../patches/ext3-max-dir-size-2.6.5-suse.patch | 42 +++++------ .../kernel_patches/patches/ext3-max-dir-size.patch | 42 +++++------ .../patches/ext3-mballoc3-core.patch | 87 ++++++++++++++-------- .../patches/ext3-mmp-2.6-rhel4.patch | 41 +++++----- .../patches/ext3-mmp-2.6-sles10.patch | 43 ++++++----- .../patches/ext3-mmp-2.6.18-vanilla.patch | 43 ++++++----- .../patches/ext3-mmp-2.6.22-vanilla.patch | 47 ++++++------ 8 files changed, 187 insertions(+), 164 deletions(-) diff --git a/ldiskfs/ChangeLog b/ldiskfs/ChangeLog index 12c510d..7192f80 100644 --- a/ldiskfs/ChangeLog +++ b/ldiskfs/ChangeLog @@ -46,6 +46,12 @@ Details : RAID striping parameters are now saved in the superblock itself, so we should use these parameters instead of having to specify a mount option each time. +Severity : normal +Bugzilla : 17490 +Description: mkfs.lustre: Unable to mount /dev/cciss/c0d1: Cannot allocate memory +Details : correctly handle device paths using a subdirectory in /dev when + creating the per-device procfs directory under /proc/fs/ldiskfs. + ------------------------------------------------------------------------------- 04-26-2008 Sun Microsystems, Inc. diff --git a/ldiskfs/kernel_patches/patches/ext3-max-dir-size-2.6.5-suse.patch b/ldiskfs/kernel_patches/patches/ext3-max-dir-size-2.6.5-suse.patch index 7ef5914..3cc8b31 100644 --- a/ldiskfs/kernel_patches/patches/ext3-max-dir-size-2.6.5-suse.patch +++ b/ldiskfs/kernel_patches/patches/ext3-max-dir-size-2.6.5-suse.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.5-7.312/fs/ext3/ialloc.c +Index: linux-2.6.5-7.314/fs/ext3/ialloc.c =================================================================== ---- linux-2.6.5-7.312.orig/fs/ext3/ialloc.c -+++ linux-2.6.5-7.312/fs/ext3/ialloc.c +--- linux-2.6.5-7.314.orig/fs/ext3/ialloc.c ++++ linux-2.6.5-7.314/fs/ext3/ialloc.c @@ -520,12 +520,15 @@ struct inode *ext3_new_inode(handle_t *h return ERR_PTR(-EPERM); @@ -19,10 +19,10 @@ Index: linux-2.6.5-7.312/fs/ext3/ialloc.c es = sbi->s_es; if (goal) { group = (goal - 1) / EXT3_INODES_PER_GROUP(sb); -Index: linux-2.6.5-7.312/fs/ext3/super.c +Index: linux-2.6.5-7.314/fs/ext3/super.c =================================================================== ---- linux-2.6.5-7.312.orig/fs/ext3/super.c -+++ linux-2.6.5-7.312/fs/ext3/super.c +--- linux-2.6.5-7.314.orig/fs/ext3/super.c ++++ linux-2.6.5-7.314/fs/ext3/super.c @@ -37,6 +37,12 @@ #include "acl.h" #include "group.h" @@ -40,11 +40,11 @@ Index: linux-2.6.5-7.312/fs/ext3/super.c invalidate_bdev(sbi->journal_bdev, 0); ext3_blkdev_remove(sbi); } -+ remove_proc_entry(EXT3_MAX_DIR_SIZE_NAME, sbi->s_dev_proc); - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -@@ -1251,6 +1258,45 @@ static unsigned long descriptor_loc(stru ++ remove_proc_entry(EXT3_MAX_DIR_SIZE_NAME, sbi->s_dev_proc); + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +@@ -1253,6 +1260,45 @@ static unsigned long descriptor_loc(stru return (first_data_block + has_super + (bg * sbi->s_blocks_per_group)); } @@ -90,7 +90,7 @@ Index: linux-2.6.5-7.312/fs/ext3/super.c static int ext3_fill_super (struct super_block *sb, void *data, int silent) { -@@ -1270,6 +1316,7 @@ static int ext3_fill_super (struct super +@@ -1273,6 +1319,7 @@ static int ext3_fill_super (struct super int db_count; int i; int needs_recovery; @@ -98,8 +98,8 @@ Index: linux-2.6.5-7.312/fs/ext3/super.c sbi = kmalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) -@@ -1287,6 +1334,23 @@ static int ext3_fill_super (struct super - return -ENOMEM; +@@ -1299,6 +1346,23 @@ static int ext3_fill_super (struct super + sb->s_id); } + sbi->s_max_dir_size = EXT3_DEFAULT_MAX_DIR_SIZE; @@ -122,18 +122,18 @@ Index: linux-2.6.5-7.312/fs/ext3/super.c blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE); if (!blocksize) { printk(KERN_ERR "EXT3-fs: unable to set blocksize\n"); -@@ -1701,6 +1765,7 @@ failed_mount: +@@ -1713,6 +1777,7 @@ failed_mount: ext3_blkdev_remove(sbi); brelse(bh); out_fail: + remove_proc_entry(EXT3_MAX_DIR_SIZE_NAME, sbi->s_dev_proc); - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -Index: linux-2.6.5-7.312/include/linux/ext3_fs_sb.h + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +Index: linux-2.6.5-7.314/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.5-7.312.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.5-7.312/include/linux/ext3_fs_sb.h +--- linux-2.6.5-7.314.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.5-7.314/include/linux/ext3_fs_sb.h @@ -119,6 +119,8 @@ struct ext3_sb_info { unsigned long s_mb_last_group; unsigned long s_mb_last_start; diff --git a/ldiskfs/kernel_patches/patches/ext3-max-dir-size.patch b/ldiskfs/kernel_patches/patches/ext3-max-dir-size.patch index ec7e06d..d55c600 100644 --- a/ldiskfs/kernel_patches/patches/ext3-max-dir-size.patch +++ b/ldiskfs/kernel_patches/patches/ext3-max-dir-size.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.18-92.1.6/fs/ext3/ialloc.c +Index: linux-2.6.22.19/fs/ext3/ialloc.c =================================================================== ---- linux-2.6.18-92.1.6.orig/fs/ext3/ialloc.c -+++ linux-2.6.18-92.1.6/fs/ext3/ialloc.c +--- linux-2.6.22.19.orig/fs/ext3/ialloc.c ++++ linux-2.6.22.19/fs/ext3/ialloc.c @@ -521,12 +521,15 @@ struct inode *ext3_new_inode(handle_t *h return ERR_PTR(-EPERM); @@ -19,10 +19,10 @@ Index: linux-2.6.18-92.1.6/fs/ext3/ialloc.c es = sbi->s_es; if (goal) { group = (goal - 1) / EXT3_INODES_PER_GROUP(sb); -Index: linux-2.6.18-92.1.6/fs/ext3/super.c +Index: linux-2.6.22.19/fs/ext3/super.c =================================================================== ---- linux-2.6.18-92.1.6.orig/fs/ext3/super.c -+++ linux-2.6.18-92.1.6/fs/ext3/super.c +--- linux-2.6.22.19.orig/fs/ext3/super.c ++++ linux-2.6.22.19/fs/ext3/super.c @@ -45,6 +45,12 @@ #include "namei.h" #include "group.h" @@ -37,14 +37,14 @@ Index: linux-2.6.18-92.1.6/fs/ext3/super.c unsigned long journal_devnum); static int ext3_create_journal(struct super_block *, struct ext3_super_block *, @@ -440,6 +446,7 @@ static void ext3_put_super (struct super + } if (sbi->s_mmp_tsk) kthread_stop(sbi->s_mmp_tsk); - + remove_proc_entry(EXT3_MAX_DIR_SIZE_NAME, sbi->s_dev_proc); - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -@@ -1853,6 +1860,45 @@ failed: + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +@@ -1849,6 +1856,45 @@ failed: return 1; } @@ -90,15 +90,15 @@ Index: linux-2.6.18-92.1.6/fs/ext3/super.c static int ext3_fill_super (struct super_block *sb, void *data, int silent) { -@@ -1873,6 +1919,7 @@ static int ext3_fill_super (struct super +@@ -1870,6 +1916,7 @@ static int ext3_fill_super (struct super int i; int needs_recovery; __le32 features; + struct proc_dir_entry *proc; - sbi = kmalloc(sizeof(*sbi), GFP_KERNEL); + sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) -@@ -1892,6 +1939,23 @@ static int ext3_fill_super (struct super +@@ -1897,6 +1944,23 @@ static int ext3_fill_super (struct super unlock_kernel(); @@ -122,18 +122,18 @@ Index: linux-2.6.18-92.1.6/fs/ext3/super.c blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE); if (!blocksize) { printk(KERN_ERR "EXT3-fs: unable to set blocksize\n"); -@@ -2327,6 +2391,7 @@ failed_mount: +@@ -2338,6 +2402,7 @@ failed_mount: ext3_blkdev_remove(sbi); brelse(bh); out_fail: + remove_proc_entry(EXT3_MAX_DIR_SIZE_NAME, sbi->s_dev_proc); - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -Index: linux-2.6.18-92.1.6/include/linux/ext3_fs_sb.h + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +Index: linux-2.6.22.19/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.18-92.1.6.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.18-92.1.6/include/linux/ext3_fs_sb.h +--- linux-2.6.22.19.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.22.19/include/linux/ext3_fs_sb.h @@ -132,6 +132,8 @@ struct ext3_sb_info { unsigned long s_mb_last_group; unsigned long s_mb_last_start; diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch index 7a26701..fa8b4ae 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch @@ -1,8 +1,8 @@ -Index: linux-2.6.18-53.1.21/include/linux/ext3_fs.h +Index: linux-2.6.22.19/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.18-53.1.21.orig/include/linux/ext3_fs.h -+++ linux-2.6.18-53.1.21/include/linux/ext3_fs.h -@@ -53,6 +53,31 @@ +--- linux-2.6.22.19.orig/include/linux/ext3_fs.h ++++ linux-2.6.22.19/include/linux/ext3_fs.h +@@ -54,6 +54,31 @@ #define ext3_debug(f, a...) do {} while (0) #endif @@ -34,7 +34,7 @@ Index: linux-2.6.18-53.1.21/include/linux/ext3_fs.h /* * Special inodes numbers */ -@@ -398,6 +423,14 @@ struct ext3_inode { +@@ -412,6 +437,14 @@ struct ext3_inode { #define ext3_find_first_zero_bit ext2_find_first_zero_bit #define ext3_find_next_zero_bit ext2_find_next_zero_bit @@ -49,7 +49,7 @@ Index: linux-2.6.18-53.1.21/include/linux/ext3_fs.h /* * Maximal mount counts between two filesystem checks */ -@@ -799,6 +832,20 @@ extern unsigned long ext3_count_dirs (st +@@ -813,6 +846,20 @@ extern unsigned long ext3_count_dirs (st extern void ext3_check_inodes_bitmap (struct super_block *); extern unsigned long ext3_count_free (struct buffer_head *, unsigned); @@ -70,7 +70,7 @@ Index: linux-2.6.18-53.1.21/include/linux/ext3_fs.h /* inode.c */ int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, -@@ -843,6 +890,10 @@ extern int ext3_group_extend(struct supe +@@ -859,6 +906,10 @@ extern int ext3_group_extend(struct supe ext3_fsblk_t n_blocks_count); /* super.c */ @@ -81,10 +81,10 @@ Index: linux-2.6.18-53.1.21/include/linux/ext3_fs.h extern void ext3_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); extern void __ext3_std_error (struct super_block *, const char *, int); -Index: linux-2.6.18-53.1.21/include/linux/ext3_fs_sb.h +Index: linux-2.6.22.19/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.18-53.1.21.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.18-53.1.21/include/linux/ext3_fs_sb.h +--- linux-2.6.22.19.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.22.19/include/linux/ext3_fs_sb.h @@ -88,6 +88,68 @@ struct ext3_sb_info { unsigned long s_ext_blocks; unsigned long s_ext_extents; @@ -154,11 +154,11 @@ Index: linux-2.6.18-53.1.21/include/linux/ext3_fs_sb.h + [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)] + #endif /* _LINUX_EXT3_FS_SB */ -Index: linux-2.6.18-53.1.21/fs/ext3/super.c +Index: linux-2.6.22.19/fs/ext3/super.c =================================================================== ---- linux-2.6.18-53.1.21.orig/fs/ext3/super.c -+++ linux-2.6.18-53.1.21/fs/ext3/super.c -@@ -391,6 +391,7 @@ static void ext3_put_super (struct super +--- linux-2.6.22.19.orig/fs/ext3/super.c ++++ linux-2.6.22.19/fs/ext3/super.c +@@ -392,6 +392,7 @@ static void ext3_put_super (struct super struct ext3_super_block *es = sbi->s_es; int i; @@ -166,16 +166,18 @@ Index: linux-2.6.18-53.1.21/fs/ext3/super.c ext3_ext_release(sb); ext3_xattr_put_super(sb); journal_destroy(sbi->s_journal); -@@ -433,6 +434,8 @@ static void ext3_put_super (struct super - invalidate_bdev(sbi->journal_bdev, 0); +@@ -434,6 +435,10 @@ static void ext3_put_super (struct super + invalidate_bdev(sbi->journal_bdev); ext3_blkdev_remove(sbi); } -+ remove_proc_entry(sb->s_id, proc_root_ext3); -+ sbi->s_dev_proc = NULL; ++ if (sbi->s_dev_proc) { ++ remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); ++ sbi->s_dev_proc = NULL; ++ } sb->s_fs_info = NULL; kfree(sbi); return; -@@ -458,6 +461,8 @@ static struct inode *ext3_alloc_inode(st +@@ -459,6 +464,8 @@ static struct inode *ext3_alloc_inode(st ei->vfs_inode.i_version = 1; memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent)); @@ -184,30 +186,49 @@ Index: linux-2.6.18-53.1.21/fs/ext3/super.c return &ei->vfs_inode; } -@@ -1454,6 +1459,13 @@ static int ext3_fill_super (struct super +@@ -1434,6 +1441,7 @@ static int ext3_fill_super (struct super + unsigned long journal_devnum = 0; + unsigned long def_mount_opts; + struct inode *root; ++ char *devname; + int blocksize; + int hblock; + int db_count; +@@ -1448,6 +1456,22 @@ static int ext3_fill_super (struct super sbi->s_mount_opt = 0; sbi->s_resuid = EXT3_DEF_RESUID; sbi->s_resgid = EXT3_DEF_RESGID; -+ sbi->s_dev_proc = proc_mkdir(sb->s_id, proc_root_ext3); -+ if (sbi->s_dev_proc == NULL) { -+ printk(KERN_ERR "EXT3-fs: Unable to create %s\n", sb->s_id); -+ sb->s_fs_info = NULL; -+ kfree(sbi); -+ return -ENOMEM; ++ devname = kstrdup(sb->s_id, GFP_KERNEL); ++ if (devname) { ++ char *p = devname; ++ while ((p = strchr(p, '/'))) ++ *p = '!'; ++ sbi->s_dev_proc = proc_mkdir(devname, proc_root_ext3); ++ if (sbi->s_dev_proc == NULL) ++ printk(KERN_WARNING "EXT3-fs warning: unable to create " ++ "procfs entry for %s(%s)\n", ++ sb->s_id, devname); ++ kfree(devname); ++ } else { ++ printk(KERN_WARNING "EXT3-fs warning: cannot allocate memory " ++ "to create procfs entry for %s\n", ++ sb->s_id); + } unlock_kernel(); -@@ -1857,6 +1869,8 @@ failed_mount: +@@ -1857,6 +1881,10 @@ failed_mount: ext3_blkdev_remove(sbi); brelse(bh); out_fail: -+ remove_proc_entry(sb->s_id, proc_root_ext3); -+ sbi->s_dev_proc = NULL; ++ if (sbi->s_dev_proc) { ++ remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); ++ sbi->s_dev_proc = NULL; ++ } sb->s_fs_info = NULL; kfree(sbi); lock_kernel(); -@@ -2782,9 +2796,46 @@ static struct file_system_type ext3_fs_t +@@ -2787,9 +2815,46 @@ static struct file_system_type ext3_fs_t .fs_flags = FS_REQUIRES_DEV, }; @@ -255,7 +276,7 @@ Index: linux-2.6.18-53.1.21/fs/ext3/super.c if (err) return err; err = init_inodecache(); -@@ -2806,6 +2857,7 @@ static void __exit exit_ext3_fs(void) +@@ -2811,6 +2876,7 @@ static void __exit exit_ext3_fs(void) unregister_filesystem(&ext3_fs_type); destroy_inodecache(); exit_ext3_xattr(); @@ -263,10 +284,10 @@ Index: linux-2.6.18-53.1.21/fs/ext3/super.c } int ext3_map_inode_page(struct inode *inode, struct page *page, -Index: linux-2.6.18-53.1.21/fs/ext3/mballoc.c +Index: linux-2.6.22.19/fs/ext3/mballoc.c =================================================================== --- /dev/null -+++ linux-2.6.18-53.1.21/fs/ext3/mballoc.c ++++ linux-2.6.22.19/fs/ext3/mballoc.c @@ -0,0 +1,4475 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch index ea3b19a..080bff0 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.9/fs/ext3/super.c +Index: linux-2.6.9-67.0.22/fs/ext3/super.c =================================================================== ---- linux-2.6.9.orig/fs/ext3/super.c -+++ linux-2.6.9/fs/ext3/super.c +--- linux-2.6.9-67.0.22.orig/fs/ext3/super.c ++++ linux-2.6.9-67.0.22/fs/ext3/super.c @@ -35,6 +35,8 @@ #include #include @@ -11,17 +11,16 @@ Index: linux-2.6.9/fs/ext3/super.c #include #include "xattr.h" #include "acl.h" -@@ -440,6 +442,9 @@ void ext3_put_super (struct super_block +@@ -440,6 +442,8 @@ void ext3_put_super (struct super_block invalidate_bdev(sbi->journal_bdev, 0); ext3_blkdev_remove(sbi); } + if (sbi->s_mmp_tsk) + kthread_stop(sbi->s_mmp_tsk); -+ - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -@@ -1439,6 +1444,314 @@ static unsigned long descriptor_loc(stru + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +@@ -1430,6 +1434,314 @@ static unsigned long descriptor_loc(stru return (first_data_block + has_super + (bg * sbi->s_blocks_per_group)); } @@ -336,7 +335,7 @@ Index: linux-2.6.9/fs/ext3/super.c static int ext3_fill_super (struct super_block *sb, void *data, int silent) { -@@ -1738,6 +2051,11 @@ static int ext3_fill_super (struct super +@@ -1754,6 +2066,11 @@ static int ext3_fill_super (struct super EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER)); @@ -348,7 +347,7 @@ Index: linux-2.6.9/fs/ext3/super.c /* * The first inode we look at is the journal inode. Don't try * root first: it may be modified in the journal! -@@ -2371,6 +2689,11 @@ int ext3_remount (struct super_block * s +@@ -2404,6 +2721,11 @@ int ext3_remount (struct super_block * s return ret; if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; @@ -360,11 +359,11 @@ Index: linux-2.6.9/fs/ext3/super.c } } return 0; -Index: linux-2.6.9/include/linux/ext3_fs.h +Index: linux-2.6.9-67.0.22/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.9.orig/include/linux/ext3_fs.h -+++ linux-2.6.9/include/linux/ext3_fs.h -@@ -577,13 +577,17 @@ struct ext3_super_block { +--- linux-2.6.9-67.0.22.orig/include/linux/ext3_fs.h ++++ linux-2.6.9-67.0.22/include/linux/ext3_fs.h +@@ -575,13 +575,17 @@ struct ext3_super_block { __le32 s_first_meta_bg; /* First metablock block group */ __le32 s_mkfs_time; /* When the filesystem was created */ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ @@ -385,7 +384,7 @@ Index: linux-2.6.9/include/linux/ext3_fs.h }; #ifdef __KERNEL__ -@@ -667,12 +671,14 @@ static inline struct ext3_inode_info *EX +@@ -665,12 +669,14 @@ static inline struct ext3_inode_info *EX #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 #define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ @@ -401,7 +400,7 @@ Index: linux-2.6.9/include/linux/ext3_fs.h #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ -@@ -832,6 +838,39 @@ struct dir_private_info { +@@ -830,6 +836,39 @@ struct dir_private_info { #define ERR_BAD_DX_DIR -75000 /* @@ -441,11 +440,11 @@ Index: linux-2.6.9/include/linux/ext3_fs.h * Function prototypes */ -Index: linux-2.6.9/include/linux/ext3_fs_sb.h +Index: linux-2.6.9-67.0.22/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.9.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.9/include/linux/ext3_fs_sb.h -@@ -143,6 +143,7 @@ struct ext3_sb_info { +--- linux-2.6.9-67.0.22.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.9-67.0.22/include/linux/ext3_fs_sb.h +@@ -150,6 +150,7 @@ struct ext3_sb_info { /* locality groups */ struct ext3_locality_group *s_locality_groups; diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch index 04635f5..0cf467a 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.16.46-0.14/fs/ext3/super.c +Index: linux-2.6.16.60-0.31/fs/ext3/super.c =================================================================== ---- linux-2.6.16.46-0.14.orig/fs/ext3/super.c -+++ linux-2.6.16.46-0.14/fs/ext3/super.c +--- linux-2.6.16.60-0.31.orig/fs/ext3/super.c ++++ linux-2.6.16.60-0.31/fs/ext3/super.c @@ -36,6 +36,8 @@ #include #include @@ -11,17 +11,16 @@ Index: linux-2.6.16.46-0.14/fs/ext3/super.c #include -@@ -436,6 +438,9 @@ static void ext3_put_super (struct super +@@ -436,6 +438,8 @@ static void ext3_put_super (struct super invalidate_bdev(sbi->journal_bdev, 0); ext3_blkdev_remove(sbi); } + if (sbi->s_mmp_tsk) + kthread_stop(sbi->s_mmp_tsk); -+ - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -@@ -1529,6 +1534,313 @@ static unsigned long descriptor_loc(stru + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +@@ -1525,6 +1529,313 @@ static unsigned long descriptor_loc(stru return (first_data_block + has_super + (bg * sbi->s_blocks_per_group)); } @@ -335,7 +334,7 @@ Index: linux-2.6.16.46-0.14/fs/ext3/super.c static int ext3_fill_super (struct super_block *sb, void *data, int silent) { -@@ -1828,6 +2140,11 @@ static int ext3_fill_super (struct super +@@ -1849,6 +2160,11 @@ static int ext3_fill_super (struct super EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER)); @@ -347,7 +346,7 @@ Index: linux-2.6.16.46-0.14/fs/ext3/super.c /* * The first inode we look at is the journal inode. Don't try * root first: it may be modified in the journal! -@@ -2438,7 +2755,7 @@ static int ext3_remount (struct super_bl +@@ -2463,7 +2779,7 @@ static int ext3_remount (struct super_bl unsigned long n_blocks_count = 0; unsigned long old_sb_flags; struct ext3_mount_options old_opts; @@ -356,7 +355,7 @@ Index: linux-2.6.16.46-0.14/fs/ext3/super.c #ifdef CONFIG_QUOTA int i; #endif -@@ -2522,6 +2839,11 @@ static int ext3_remount (struct super_bl +@@ -2547,6 +2863,11 @@ static int ext3_remount (struct super_bl } if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; @@ -368,11 +367,11 @@ Index: linux-2.6.16.46-0.14/fs/ext3/super.c } } #ifdef CONFIG_QUOTA -Index: linux-2.6.16.46-0.14/include/linux/ext3_fs.h +Index: linux-2.6.16.60-0.31/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.16.46-0.14.orig/include/linux/ext3_fs.h -+++ linux-2.6.16.46-0.14/include/linux/ext3_fs.h -@@ -599,13 +599,17 @@ struct ext3_super_block { +--- linux-2.6.16.60-0.31.orig/include/linux/ext3_fs.h ++++ linux-2.6.16.60-0.31/include/linux/ext3_fs.h +@@ -597,13 +597,17 @@ struct ext3_super_block { __le32 s_first_meta_bg; /* First metablock block group */ __le32 s_mkfs_time; /* When the filesystem was created */ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ @@ -393,7 +392,7 @@ Index: linux-2.6.16.46-0.14/include/linux/ext3_fs.h }; #ifdef __KERNEL__ -@@ -699,12 +703,14 @@ static inline int ext3_valid_inum(struct +@@ -697,12 +701,14 @@ static inline int ext3_valid_inum(struct #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 #define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ @@ -409,7 +408,7 @@ Index: linux-2.6.16.46-0.14/include/linux/ext3_fs.h #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ -@@ -864,6 +870,39 @@ struct dir_private_info { +@@ -862,6 +868,39 @@ struct dir_private_info { #define ERR_BAD_DX_DIR -75000 /* @@ -449,11 +448,11 @@ Index: linux-2.6.16.46-0.14/include/linux/ext3_fs.h * Function prototypes */ -Index: linux-2.6.16.46-0.14/include/linux/ext3_fs_sb.h +Index: linux-2.6.16.60-0.31/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.16.46-0.14.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.16.46-0.14/include/linux/ext3_fs_sb.h -@@ -140,6 +140,7 @@ struct ext3_sb_info { +--- linux-2.6.16.60-0.31.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.16.60-0.31/include/linux/ext3_fs_sb.h +@@ -147,6 +147,7 @@ struct ext3_sb_info { /* locality groups */ struct ext3_locality_group *s_locality_groups; diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch index 26f86b8..1914c9a 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.18/fs/ext3/super.c +Index: linux-2.6.18-92.1.17/fs/ext3/super.c =================================================================== ---- linux-2.6.18.orig/fs/ext3/super.c -+++ linux-2.6.18/fs/ext3/super.c +--- linux-2.6.18-92.1.17.orig/fs/ext3/super.c ++++ linux-2.6.18-92.1.17/fs/ext3/super.c @@ -35,6 +35,8 @@ #include #include @@ -11,17 +11,16 @@ Index: linux-2.6.18/fs/ext3/super.c #include -@@ -435,6 +437,9 @@ static void ext3_put_super (struct super +@@ -435,6 +437,8 @@ static void ext3_put_super (struct super invalidate_bdev(sbi->journal_bdev, 0); ext3_blkdev_remove(sbi); } + if (sbi->s_mmp_tsk) + kthread_stop(sbi->s_mmp_tsk); -+ - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -@@ -1536,6 +1541,313 @@ static ext3_fsblk_t descriptor_loc(struc + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +@@ -1543,6 +1547,313 @@ static ext3_fsblk_t descriptor_loc(struc return (has_super + ext3_group_first_block_no(sb, bg)); } @@ -335,7 +334,7 @@ Index: linux-2.6.18/fs/ext3/super.c static int ext3_fill_super (struct super_block *sb, void *data, int silent) { -@@ -1844,6 +2156,11 @@ static int ext3_fill_super (struct super +@@ -1875,6 +2186,11 @@ static int ext3_fill_super (struct super EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER)); @@ -347,7 +346,7 @@ Index: linux-2.6.18/fs/ext3/super.c /* * The first inode we look at is the journal inode. Don't try * root first: it may be modified in the journal! -@@ -2446,7 +2763,7 @@ static int ext3_remount (struct super_bl +@@ -2482,7 +2798,7 @@ static int ext3_remount (struct super_bl ext3_fsblk_t n_blocks_count = 0; unsigned long old_sb_flags; struct ext3_mount_options old_opts; @@ -356,7 +355,7 @@ Index: linux-2.6.18/fs/ext3/super.c #ifdef CONFIG_QUOTA int i; #endif -@@ -2530,6 +2847,11 @@ static int ext3_remount (struct super_bl +@@ -2580,6 +2896,11 @@ static int ext3_remount (struct super_bl } if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; @@ -368,11 +367,11 @@ Index: linux-2.6.18/fs/ext3/super.c } } #ifdef CONFIG_QUOTA -Index: linux-2.6.18/include/linux/ext3_fs.h +Index: linux-2.6.18-92.1.17/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.18.orig/include/linux/ext3_fs.h -+++ linux-2.6.18/include/linux/ext3_fs.h -@@ -593,13 +593,17 @@ struct ext3_super_block { +--- linux-2.6.18-92.1.17.orig/include/linux/ext3_fs.h ++++ linux-2.6.18-92.1.17/include/linux/ext3_fs.h +@@ -594,13 +594,17 @@ struct ext3_super_block { __le32 s_first_meta_bg; /* First metablock block group */ __le32 s_mkfs_time; /* When the filesystem was created */ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ @@ -393,7 +392,7 @@ Index: linux-2.6.18/include/linux/ext3_fs.h }; #ifdef __KERNEL__ -@@ -702,12 +706,14 @@ static inline int ext3_valid_inum(struct +@@ -703,12 +707,14 @@ static inline int ext3_valid_inum(struct #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 #define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ @@ -409,7 +408,7 @@ Index: linux-2.6.18/include/linux/ext3_fs.h #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ -@@ -870,6 +876,39 @@ ext3_group_first_block_no(struct super_b +@@ -871,6 +877,39 @@ ext3_group_first_block_no(struct super_b #define ERR_BAD_DX_DIR -75000 /* @@ -449,11 +448,11 @@ Index: linux-2.6.18/include/linux/ext3_fs.h * Function prototypes */ -Index: linux-2.6.18/include/linux/ext3_fs_sb.h +Index: linux-2.6.18-92.1.17/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.18.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.18/include/linux/ext3_fs_sb.h -@@ -151,6 +151,7 @@ struct ext3_sb_info { +--- linux-2.6.18-92.1.17.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.18-92.1.17/include/linux/ext3_fs_sb.h +@@ -158,6 +158,7 @@ struct ext3_sb_info { /* locality groups */ struct ext3_locality_group *s_locality_groups; diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch index c7fd5f6..e041985 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.18/fs/ext3/super.c +Index: linux-2.6.22.19/fs/ext3/super.c =================================================================== ---- linux-2.6.18.orig/fs/ext3/super.c -+++ linux-2.6.18/fs/ext3/super.c +--- linux-2.6.22.19.orig/fs/ext3/super.c ++++ linux-2.6.22.19/fs/ext3/super.c @@ -35,6 +35,8 @@ #include #include @@ -11,17 +11,16 @@ Index: linux-2.6.18/fs/ext3/super.c #include -@@ -435,6 +437,9 @@ static void ext3_put_super (struct super - invalidate_bdev(sbi->journal_bdev, 0); +@@ -436,6 +438,8 @@ static void ext3_put_super (struct super + invalidate_bdev(sbi->journal_bdev); ext3_blkdev_remove(sbi); } + if (sbi->s_mmp_tsk) + kthread_stop(sbi->s_mmp_tsk); -+ - remove_proc_entry(sb->s_id, proc_root_ext3); - sbi->s_dev_proc = NULL; - sb->s_fs_info = NULL; -@@ -1536,6 +1541,313 @@ static ext3_fsblk_t descriptor_loc(struc + if (sbi->s_dev_proc) { + remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3); + sbi->s_dev_proc = NULL; +@@ -1538,6 +1542,313 @@ static ext3_fsblk_t descriptor_loc(struc return (has_super + ext3_group_first_block_no(sb, bg)); } @@ -335,7 +334,7 @@ Index: linux-2.6.18/fs/ext3/super.c static int ext3_fill_super (struct super_block *sb, void *data, int silent) { -@@ -1844,6 +2156,11 @@ static int ext3_fill_super (struct super +@@ -1875,6 +2186,11 @@ static int ext3_fill_super (struct super EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER)); @@ -347,7 +346,7 @@ Index: linux-2.6.18/fs/ext3/super.c /* * The first inode we look at is the journal inode. Don't try * root first: it may be modified in the journal! -@@ -2446,7 +2763,7 @@ static int ext3_remount (struct super_bl +@@ -2482,7 +2798,7 @@ static int ext3_remount (struct super_bl ext3_fsblk_t n_blocks_count = 0; unsigned long old_sb_flags; struct ext3_mount_options old_opts; @@ -356,8 +355,8 @@ Index: linux-2.6.18/fs/ext3/super.c #ifdef CONFIG_QUOTA int i; #endif -@@ -2530,6 +2847,11 @@ static int ext3_remount (struct super_bl - } +@@ -2580,6 +2896,11 @@ static int ext3_remount (struct super_bl + goto restore_opts; if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; + if (EXT3_HAS_INCOMPAT_FEATURE(sb, @@ -368,11 +367,11 @@ Index: linux-2.6.18/fs/ext3/super.c } } #ifdef CONFIG_QUOTA -Index: linux-2.6.18/include/linux/ext3_fs.h +Index: linux-2.6.22.19/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.18.orig/include/linux/ext3_fs.h -+++ linux-2.6.18/include/linux/ext3_fs.h -@@ -593,13 +593,17 @@ struct ext3_super_block { +--- linux-2.6.22.19.orig/include/linux/ext3_fs.h ++++ linux-2.6.22.19/include/linux/ext3_fs.h +@@ -608,13 +608,17 @@ struct ext3_super_block { __le32 s_first_meta_bg; /* First metablock block group */ __le32 s_mkfs_time; /* When the filesystem was created */ __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ @@ -393,7 +392,7 @@ Index: linux-2.6.18/include/linux/ext3_fs.h }; #ifdef __KERNEL__ -@@ -702,12 +706,14 @@ static inline int ext3_valid_inum(struct +@@ -717,12 +721,14 @@ static inline int ext3_valid_inum(struct #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 #define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ @@ -409,7 +408,7 @@ Index: linux-2.6.18/include/linux/ext3_fs.h #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \ EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \ EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ -@@ -870,6 +876,39 @@ ext3_group_first_block_no(struct super_b +@@ -885,6 +891,39 @@ ext3_group_first_block_no(struct super_b #define ERR_BAD_DX_DIR -75000 /* @@ -449,11 +448,11 @@ Index: linux-2.6.18/include/linux/ext3_fs.h * Function prototypes */ -Index: linux-2.6.18/include/linux/ext3_fs_sb.h +Index: linux-2.6.22.19/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.18.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.18/include/linux/ext3_fs_sb.h -@@ -151,6 +151,7 @@ struct ext3_sb_info { +--- linux-2.6.22.19.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.22.19/include/linux/ext3_fs_sb.h +@@ -158,6 +158,7 @@ struct ext3_sb_info { /* locality groups */ struct ext3_locality_group *s_locality_groups; -- 1.8.3.1