From: Bob Glossman Date: Wed, 8 May 2013 22:04:49 +0000 (-0700) Subject: LU-3292 build: kernel update for 3.0.74-0.6.6 sles11sp2 X-Git-Tag: 2.4.0-RC1~1 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6b029ae0db0b6da51ae5c9214067fc321b6ca783;hp=565b6203761a09b28f6aee08c4dd4a5f6dbaf4f1 LU-3292 build: kernel update for 3.0.74-0.6.6 sles11sp2 Delete base and ldiskfs patches that are now obsolete in the latest kernel update version for SLES11 SP2. Signed-off-by: Bob Glossman Change-Id: I9a5ef1347afb228453db79b213e3881c6a112938 Reviewed-on: http://review.whamcloud.com/6293 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: chas williams - CONTRACTOR Reviewed-by: Oleg Drokin --- diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-add-missing-kfree-on-error-return-path-in-add_new_gdb.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-add-missing-kfree-on-error-return-path-in-add_new_gdb.patch deleted file mode 100644 index 60bc6fe..0000000 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-add-missing-kfree-on-error-return-path-in-add_new_gdb.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c49bafa3842751b8955a962859f42d307673d75d Mon Sep 17 00:00:00 2001 -From: Dan Carpenter -Date: Sat, 30 Jul 2011 12:58:41 -0400 -Subject: ext4: add missing kfree() on error return path in add_new_gdb() -Git-commit: c49bafa3 -Patch-mainline: v3.1-rc1 - -We added some more error handling in b40971426a "ext4: add error -checking to calls to ext4_handle_dirty_metadata()". But we need to -call kfree() as well to avoid a memory leak. - -Upstream-Signed-off-by: Dan Carpenter -Upstream-Signed-off-by: "Theodore Ts'o" -Signed-off-by: Jeff Mahoney ---- - fs/ext4/resize.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c -index 6e3327d..71085df 100644 ---- a/fs/ext4/resize.c -+++ b/fs/ext4/resize.c -@@ -517,6 +517,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, - return err; - - exit_inode: -+ kfree(n_group_desc); - /* ext4_handle_release_buffer(handle, iloc.bh); */ - brelse(iloc.bh); - exit_dindj: - diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-free-resources-in-some-error-path-in-ext4_fill_super.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-free-resources-in-some-error-path-in-ext4_fill_super.patch deleted file mode 100644 index 5b66631..0000000 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-free-resources-in-some-error-path-in-ext4_fill_super.patch +++ /dev/null @@ -1,71 +0,0 @@ -From dcf2d804ed6ffe5e942b909ed5e5b74628be6ee4 Mon Sep 17 00:00:00 2001 -From: Tao Ma -Date: Thu, 6 Oct 2011 12:10:11 -0400 -Subject: ext4: Free resources in some error path in ext4_fill_super -Git-commit: dcf2d804 -Patch-mainline: v3.2-rc1 - -Some of the error path in ext4_fill_super don't release the -resouces properly. So this patch just try to release them -in the right way. - -Upstream-Signed-off-by: Tao Ma -Upstream-Signed-off-by: "Theodore Ts'o" -Signed-off-by: Jeff Mahoney ---- - fs/ext4/super.c | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -diff --git a/fs/ext4/super.c b/fs/ext4/super.c -index 07f3de3..db2cd3f 100644 ---- a/fs/ext4/super.c -+++ b/fs/ext4/super.c -@@ -3785,22 +3785,19 @@ no_journal: - if (err) { - ext4_msg(sb, KERN_ERR, "failed to initialize mballoc (%d)", - err); -- goto failed_mount4; -+ goto failed_mount5; - } - - err = ext4_register_li_request(sb, first_not_zeroed); - if (err) -- goto failed_mount4; -+ goto failed_mount6; - - sbi->s_kobj.kset = ext4_kset; - init_completion(&sbi->s_kobj_unregister); - err = kobject_init_and_add(&sbi->s_kobj, &ext4_ktype, NULL, - "%s", sb->s_id); -- if (err) { -- ext4_mb_release(sb); -- ext4_ext_release(sb); -- goto failed_mount4; -- }; -+ if (err) -+ goto failed_mount7; - - EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS; - ext4_orphan_cleanup(sb, es); -@@ -3834,13 +3831,19 @@ cantfind_ext4: - ext4_msg(sb, KERN_ERR, "VFS: Can't find ext4 filesystem"); - goto failed_mount; - -+failed_mount7: -+ ext4_unregister_li_request(sb); -+failed_mount6: -+ ext4_ext_release(sb); -+failed_mount5: -+ ext4_mb_release(sb); -+ ext4_release_system_zone(sb); - failed_mount4: - iput(root); - sb->s_root = NULL; - ext4_msg(sb, KERN_ERR, "mount failed"); - destroy_workqueue(EXT4_SB(sb)->dio_unwritten_wq); - failed_mount_wq: -- ext4_release_system_zone(sb); - if (sbi->s_journal) { - jbd2_journal_destroy(sbi->s_journal); - sbi->s_journal = NULL; - diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series index 007ae2a..3f3f6dd 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series @@ -1,11 +1,9 @@ sles11sp2/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch sles11sp2/ext4-speed-up-fitrim-by-recording-flags-in-ext4_group_info.patch -sles11sp2/ext4-add-missing-kfree-on-error-return-path-in-add_new_gdb.patch sles11sp2/ext4-use-ext4_kvzalloc-ext4_kvmalloc-for-s_group_desc-and-s_group_info.patch sles11sp2/ext4-use-ext4_msg-instead-of-printk-in-mballoc.patch sles11sp2/revert-ext4-avoid-uninitialized-memory-references-in-ext3_htree_next_block.patch sles11sp2/ext4-journal-callback.patch -sles11sp2/ext4-free-resources-in-some-error-path-in-ext4_fill_super.patch sles11sp2/ext4-make-quota-as-first-class-supported-feature.patch sles11sp2/ext4-handle-cleanup-after-quota-failure.patch diff --git a/lustre/kernel_patches/patches/dev_read_only-3.0-sles11.patch b/lustre/kernel_patches/patches/dev_read_only-3.0-sles11.patch deleted file mode 100644 index 8d03b19..0000000 --- a/lustre/kernel_patches/patches/dev_read_only-3.0-sles11.patch +++ /dev/null @@ -1,174 +0,0 @@ -This patch is no longer needed for Lustre. It is only included -for testing and ease of using the same kernel with older Lustre -versions. This testing functionality was replaced in Linux 3.0 -by the dm-flakey driver. - -This functionality is mainly used during testing, in order to -simulate a server crash for ldiskfs by discarding all of the -writes to the filesystem. For recovery testing we could simulate -this by using a special loopback or DM device that also discards -writes to the device. - -This functionality is also used by target "failback" in order -to speed up service shutdown and takeover by the other node -during controlled operation. However, it would also be possible -to do this by simply allowing all of the in-flight requests to -complete and then waiting for the service to stop. This will -also be needed by the DMU-OSD, because discarding of writes on -a DMU-based target is not safe as it could trigger a storage -failure if the data is ever read from disk again and the -checksum does not match that expected by the block pointer. - -Index: linux-3.0/block/blk-core.c -=================================================================== ---- linux-3.0.orig/block/blk-core.c 2013-01-25 11:25:32.000000000 -0500 -+++ linux-3.0/block/blk-core.c 2013-01-25 11:31:53.000000000 -0500 -@@ -1390,6 +1390,8 @@ - - #endif /* CONFIG_FAIL_MAKE_REQUEST */ - -+int dev_check_rdonly(struct block_device *bdev); -+ - /* - * Check whether this bio extends beyond the end of the device. - */ -@@ -1491,6 +1493,12 @@ - if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) - goto end_io; - -+ /* this is cfs's dev_rdonly check */ -+ if (bio_rw(bio) == WRITE && dev_check_rdonly(bio->bi_bdev)) { -+ err = 0; -+ goto end_io; -+ } -+ - if (should_fail_request(bio)) - goto end_io; - -@@ -2796,6 +2804,99 @@ - } - EXPORT_SYMBOL(blk_finish_plug); - -+/* -+ * Debug code for turning block devices "read-only" (will discard writes -+ * silently). This is for filesystem crash/recovery testing. -+ */ -+struct deventry { -+ dev_t dev; -+ struct deventry *next; -+}; -+ -+static struct deventry *devlist = NULL; -+static spinlock_t devlock = __SPIN_LOCK_UNLOCKED(devlock); -+ -+int dev_check_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur; -+ -+ if (!bdev) -+ return 0; -+ -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ return 1; -+ } -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+ return 0; -+} -+ -+void dev_set_rdonly(struct block_device *bdev) -+{ -+ struct deventry *newdev, *cur; -+ -+ if (!bdev) -+ return; -+ -+ newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL); -+ if (!newdev) -+ return; -+ -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ spin_unlock(&devlock); -+ kfree(newdev); -+ return; -+ } -+ cur = cur->next; -+ } -+ newdev->dev = bdev->bd_dev; -+ newdev->next = devlist; -+ devlist = newdev; -+ spin_unlock(&devlock); -+ printk(KERN_WARNING "Turning device %s (%#x) read-only\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev); -+} -+ -+void dev_clear_rdonly(struct block_device *bdev) -+{ -+ struct deventry *cur, *last = NULL; -+ -+ if (!bdev) -+ return; -+ -+ spin_lock(&devlock); -+ cur = devlist; -+ while(cur) { -+ if (bdev->bd_dev == cur->dev) { -+ if (last) -+ last->next = cur->next; -+ else -+ devlist = cur->next; -+ spin_unlock(&devlock); -+ kfree(cur); -+ printk(KERN_WARNING "Removing read-only on %s (%#x)\n", -+ bdev->bd_disk ? bdev->bd_disk->disk_name : -+ "unknown block", bdev->bd_dev); -+ return; -+ } -+ last = cur; -+ cur = cur->next; -+ } -+ spin_unlock(&devlock); -+} -+ -+EXPORT_SYMBOL(dev_set_rdonly); -+EXPORT_SYMBOL(dev_clear_rdonly); -+EXPORT_SYMBOL(dev_check_rdonly); -+ - int __init blk_dev_init(void) - { - BUILD_BUG_ON(__REQ_NR_BITS > 8 * -Index: linux-2.6.32-131.0.15.el6.x86_64/fs/block_dev.c -=================================================================== ---- linux-2.6.32-131.0.15.el6.x86_64.orig/fs/block_dev.c 2011-05-10 21:38:29.000000000 +0300 -+++ linux-2.6.32-131.0.15.el6.x86_64/fs/block_dev.c 2011-05-19 21:01:04.000000000 +0300 -@@ -1389,6 +1389,7 @@ static int __blkdev_put(struct block_dev - if (bdev != bdev->bd_contains) - victim = bdev->bd_contains; - bdev->bd_contains = NULL; -+ dev_clear_rdonly(bdev); - - put_disk(disk); - module_put(owner); -Index: linux-2.6.32-131.0.15.el6.x86_64/include/linux/fs.h -=================================================================== ---- linux-2.6.32-131.0.15.el6.x86_64.orig/include/linux/fs.h 2011-05-10 21:38:29.000000000 +0300 -+++ linux-2.6.32-131.0.15.el6.x86_64/include/linux/fs.h 2011-05-19 21:01:04.000000000 +0300 -@@ -2244,6 +2244,10 @@ struct bio; - extern void submit_bio(int, struct bio *); - extern int bdev_read_only(struct block_device *); - #endif -+#define HAVE_CLEAR_RDONLY_ON_PUT -+extern void dev_set_rdonly(struct block_device *bdev); -+extern int dev_check_rdonly(struct block_device *bdev); -+extern void dev_clear_rdonly(struct block_device *bdev); - extern int set_blocksize(struct block_device *, int); - extern int sb_set_blocksize(struct super_block *, int); - extern int sb_min_blocksize(struct super_block *, int); diff --git a/lustre/kernel_patches/patches/replace_dqptr_sem-sles11sp2.patch b/lustre/kernel_patches/patches/replace_dqptr_sem-sles11sp2.patch index 495eeb3..add80d2 100644 --- a/lustre/kernel_patches/patches/replace_dqptr_sem-sles11sp2.patch +++ b/lustre/kernel_patches/patches/replace_dqptr_sem-sles11sp2.patch @@ -578,14 +578,3 @@ diff -urp linux-3.0.61-0.orig/include/linux/fs.h linux-3.0.61-0/include/linux/fs loff_t inode_get_bytes(struct inode *inode); void inode_set_bytes(struct inode *inode, loff_t bytes); -diff -urp linux-3.0.61-0.orig/include/linux/quota.h linux-3.0.61-0/include/linux/quota.h ---- linux-3.0.61-0.orig/include/linux/quota.h 2013-04-10 15:15:10.000000000 -0400 -+++ linux-3.0.61-0/include/linux/quota.h 2013-04-24 10:27:22.000000000 -0400 -@@ -413,6 +413,7 @@ struct quota_module_name { - #define INIT_QUOTA_MODULE_NAMES {\ - {QFMT_VFS_OLD, "quota_v1"},\ - {QFMT_VFS_V0, "quota_v2"},\ -+ {QFMT_VFS_V1, "quota_v2"},\ - {0, NULL}} - - #else diff --git a/lustre/kernel_patches/series/3.0-sles11.series b/lustre/kernel_patches/series/3.0-sles11.series index 13bdeb0..b7a51fd 100644 --- a/lustre/kernel_patches/series/3.0-sles11.series +++ b/lustre/kernel_patches/series/3.0-sles11.series @@ -1,5 +1,4 @@ raid5-mmp-unplug-dev-sles11sp2.patch replace_dqptr_sem-sles11sp2.patch -dev_read_only-3.0-sles11.patch blkdev_tunables-3.0-sles11.patch bh_lru_size_config.patch