From 2b7bddf06c30da08f8d6270b40f0d382c1c5fc6e Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 4 May 2017 11:39:05 -0400 Subject: [RHEL7.5 PATCH 107/169] kernel-patch: Remove obsolete kernel patches against 2.6 While we still support some of these kernels, I do not think it makes sense to carry this patches around at this point. Signed-off-by: Jes Sorensen --- kernel-patch-2.6.18 | 35 --------- kernel-patch-2.6.18.6 | 35 --------- kernel-patch-2.6.19 | 34 --------- kernel-patch-2.6.25 | 199 -------------------------------------------------- kernel-patch-2.6.27 | 36 --------- 5 files changed, 339 deletions(-) delete mode 100644 kernel-patch-2.6.18 delete mode 100644 kernel-patch-2.6.18.6 delete mode 100644 kernel-patch-2.6.19 delete mode 100644 kernel-patch-2.6.25 delete mode 100644 kernel-patch-2.6.27 diff --git a/kernel-patch-2.6.18 b/kernel-patch-2.6.18 deleted file mode 100644 index 87496ea..0000000 --- a/kernel-patch-2.6.18 +++ /dev/null @@ -1,35 +0,0 @@ - -### Diffstat output - ./drivers/md/md.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff .prev/drivers/md/md.c ./drivers/md/md.c ---- .prev/drivers/md/md.c 2006-10-23 10:26:37.000000000 +1000 -+++ ./drivers/md/md.c 2006-12-21 16:28:29.000000000 +1100 -@@ -1783,7 +1783,8 @@ state_store(mdk_rdev_t *rdev, const char - else { - mddev_t *mddev = rdev->mddev; - kick_rdev_from_array(rdev); -- md_update_sb(mddev); -+ if (mddev->pers) -+ md_update_sb(mddev); - md_new_event(mddev); - err = 0; - } -@@ -1994,6 +1995,8 @@ static mdk_rdev_t *md_import_device(dev_ - kobject_init(&rdev->kobj); - - rdev->desc_nr = -1; -+ rdev->saved_raid_disk = -1; -+ rdev->raid_disk = -1; - rdev->flags = 0; - rdev->data_offset = 0; - rdev->sb_events = 0; -@@ -3991,6 +3994,7 @@ static int set_array_info(mddev_t * mdde - mddev->major_version = info->major_version; - mddev->minor_version = info->minor_version; - mddev->patch_version = info->patch_version; -+ mddev->persistent = ! info->not_persistent; - return 0; - } - mddev->major_version = MD_MAJOR_VERSION; diff --git a/kernel-patch-2.6.18.6 b/kernel-patch-2.6.18.6 deleted file mode 100644 index e702e14..0000000 --- a/kernel-patch-2.6.18.6 +++ /dev/null @@ -1,35 +0,0 @@ -Signed-off-by: Neil Brown - -### Diffstat output - ./drivers/md/md.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff .prev/drivers/md/md.c ./drivers/md/md.c ---- .prev/drivers/md/md.c 2006-12-21 17:08:23.000000000 +1100 -+++ ./drivers/md/md.c 2006-12-21 17:08:26.000000000 +1100 -@@ -1783,7 +1783,8 @@ state_store(mdk_rdev_t *rdev, const char - else { - mddev_t *mddev = rdev->mddev; - kick_rdev_from_array(rdev); -- md_update_sb(mddev); -+ if (mddev->pers) -+ md_update_sb(mddev); - md_new_event(mddev); - err = 0; - } -@@ -1995,6 +1996,7 @@ static mdk_rdev_t *md_import_device(dev_ - - rdev->desc_nr = -1; - rdev->saved_raid_disk = -1; -+ rdev->raid_disk = -1; - rdev->flags = 0; - rdev->data_offset = 0; - rdev->sb_events = 0; -@@ -3993,6 +3995,7 @@ static int set_array_info(mddev_t * mdde - mddev->major_version = info->major_version; - mddev->minor_version = info->minor_version; - mddev->patch_version = info->patch_version; -+ mddev->persistent = ! info->not_persistent; - return 0; - } - mddev->major_version = MD_MAJOR_VERSION; diff --git a/kernel-patch-2.6.19 b/kernel-patch-2.6.19 deleted file mode 100644 index 22a67a3..0000000 --- a/kernel-patch-2.6.19 +++ /dev/null @@ -1,34 +0,0 @@ - -### Diffstat output - ./drivers/md/md.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff .prev/drivers/md/md.c ./drivers/md/md.c ---- .prev/drivers/md/md.c 2006-12-21 15:55:01.000000000 +1100 -+++ ./drivers/md/md.c 2006-12-21 16:28:09.000000000 +1100 -@@ -1792,7 +1792,8 @@ state_store(mdk_rdev_t *rdev, const char - else { - mddev_t *mddev = rdev->mddev; - kick_rdev_from_array(rdev); -- md_update_sb(mddev, 1); -+ if (mddev->pers) -+ md_update_sb(mddev, 1); - md_new_event(mddev); - err = 0; - } -@@ -2004,6 +2005,7 @@ static mdk_rdev_t *md_import_device(dev_ - - rdev->desc_nr = -1; - rdev->saved_raid_disk = -1; -+ rdev->raid_disk = -1; - rdev->flags = 0; - rdev->data_offset = 0; - rdev->sb_events = 0; -@@ -3977,6 +3979,7 @@ static int set_array_info(mddev_t * mdde - mddev->major_version = info->major_version; - mddev->minor_version = info->minor_version; - mddev->patch_version = info->patch_version; -+ mddev->persistent = ! info->not_persistent; - return 0; - } - mddev->major_version = MD_MAJOR_VERSION; diff --git a/kernel-patch-2.6.25 b/kernel-patch-2.6.25 deleted file mode 100644 index 2329007..0000000 --- a/kernel-patch-2.6.25 +++ /dev/null @@ -1,199 +0,0 @@ -Status: ok - -Support adding a spare to a live md array with external metadata. - -i.e. extend the 'md/dev-XXX/slot' attribute so that you can -tell a device to fill an vacant slot in an and md array. - - -Signed-off-by: Neil Brown - -### Diffstat output - ./drivers/md/md.c | 44 ++++++++++++++++++++++++++++++++++++++++---- - ./drivers/md/multipath.c | 7 ++++++- - ./drivers/md/raid1.c | 7 ++++++- - ./drivers/md/raid10.c | 10 ++++++++-- - ./drivers/md/raid5.c | 10 ++++++++-- - 5 files changed, 68 insertions(+), 10 deletions(-) - -diff .prev/drivers/md/md.c ./drivers/md/md.c ---- .prev/drivers/md/md.c 2008-06-05 09:19:56.000000000 +1000 -+++ ./drivers/md/md.c 2008-06-10 10:41:21.000000000 +1000 -@@ -1932,7 +1932,7 @@ slot_store(mdk_rdev_t *rdev, const char - slot = -1; - else if (e==buf || (*e && *e!= '\n')) - return -EINVAL; -- if (rdev->mddev->pers) { -+ if (rdev->mddev->pers && slot == -1) { - /* Setting 'slot' on an active array requires also - * updating the 'rd%d' link, and communicating - * with the personality with ->hot_*_disk. -@@ -1940,8 +1940,6 @@ slot_store(mdk_rdev_t *rdev, const char - * failed/spare devices. This normally happens automatically, - * but not when the metadata is externally managed. - */ -- if (slot != -1) -- return -EBUSY; - if (rdev->raid_disk == -1) - return -EEXIST; - /* personality does all needed checks */ -@@ -1955,6 +1953,44 @@ slot_store(mdk_rdev_t *rdev, const char - sysfs_remove_link(&rdev->mddev->kobj, nm); - set_bit(MD_RECOVERY_NEEDED, &rdev->mddev->recovery); - md_wakeup_thread(rdev->mddev->thread); -+ } else if (rdev->mddev->pers) { -+ mdk_rdev_t *rdev2; -+ struct list_head *tmp; -+ /* Activating a spare .. or possibly reactivating -+ * if we every get bitmaps working here. -+ */ -+ -+ if (rdev->raid_disk != -1) -+ return -EBUSY; -+ -+ if (rdev->mddev->pers->hot_add_disk == NULL) -+ return -EINVAL; -+ -+ rdev_for_each(rdev2, tmp, rdev->mddev) -+ if (rdev2->raid_disk == slot) -+ return -EEXIST; -+ -+ rdev->raid_disk = slot; -+ if (test_bit(In_sync, &rdev->flags)) -+ rdev->saved_raid_disk = slot; -+ else -+ rdev->saved_raid_disk = -1; -+ err = rdev->mddev->pers-> -+ hot_add_disk(rdev->mddev, rdev); -+ if (err != 1) { -+ rdev->raid_disk = -1; -+ if (err == 0) -+ return -EEXIST; -+ return err; -+ } -+ sprintf(nm, "rd%d", rdev->raid_disk); -+ if (sysfs_create_link(&rdev->mddev->kobj, &rdev->kobj, nm)) -+ printk(KERN_WARNING -+ "md: cannot register " -+ "%s for %s\n", -+ nm, mdname(rdev->mddev)); -+ -+ /* don't wakeup anyone, leave that to userspace. */ - } else { - if (slot >= rdev->mddev->raid_disks) - return -ENOSPC; -@@ -4205,7 +4241,7 @@ static int add_new_disk(mddev_t * mddev, - super_types[mddev->major_version]. - validate_super(mddev, rdev); - err = mddev->pers->hot_add_disk(mddev, rdev); -- if (err) -+ if (err < 0) - unbind_rdev_from_array(rdev); - } - if (err) - -diff .prev/drivers/md/multipath.c ./drivers/md/multipath.c ---- .prev/drivers/md/multipath.c 2008-05-30 14:49:31.000000000 +1000 -+++ ./drivers/md/multipath.c 2008-06-10 10:35:03.000000000 +1000 -@@ -284,10 +284,15 @@ static int multipath_add_disk(mddev_t *m - int found = 0; - int path; - struct multipath_info *p; -+ int first = 0; -+ int last = mddev->raid_disks - 1; -+ -+ if (rdev->raid_disk >= 0) -+ first = last = rdev->raid_disk; - - print_multipath_conf(conf); - -- for (path=0; pathraid_disks; path++) -+ for (path = first; path <= last; path++) - if ((p=conf->multipaths+path)->rdev == NULL) { - q = rdev->bdev->bd_disk->queue; - blk_queue_stack_limits(mddev->queue, q); - -diff .prev/drivers/md/raid10.c ./drivers/md/raid10.c ---- .prev/drivers/md/raid10.c 2008-05-30 14:49:31.000000000 +1000 -+++ ./drivers/md/raid10.c 2008-06-10 10:28:53.000000000 +1000 -@@ -1116,6 +1116,8 @@ static int raid10_add_disk(mddev_t *mdde - int found = 0; - int mirror; - mirror_info_t *p; -+ int first = 0; -+ int last = mddev->raid_disks - 1; - - if (mddev->recovery_cp < MaxSector) - /* only hot-add to in-sync arrays, as recovery is -@@ -1125,12 +1127,16 @@ static int raid10_add_disk(mddev_t *mdde - if (!enough(conf)) - return 0; - -+ if (rdev->raid_disk) -+ first = last = rdev->raid_disk; -+ - if (rdev->saved_raid_disk >= 0 && -+ rdev->saved_raid_disk >= first && - conf->mirrors[rdev->saved_raid_disk].rdev == NULL) - mirror = rdev->saved_raid_disk; - else -- mirror = 0; -- for ( ; mirror < mddev->raid_disks; mirror++) -+ mirror = first; -+ for ( ; mirror <= last ; mirror++) - if ( !(p=conf->mirrors+mirror)->rdev) { - - blk_queue_stack_limits(mddev->queue, - -diff .prev/drivers/md/raid1.c ./drivers/md/raid1.c ---- .prev/drivers/md/raid1.c 2008-05-30 14:49:31.000000000 +1000 -+++ ./drivers/md/raid1.c 2008-06-10 10:41:00.000000000 +1000 -@@ -1103,8 +1103,13 @@ static int raid1_add_disk(mddev_t *mddev - int found = 0; - int mirror = 0; - mirror_info_t *p; -+ int first = 0; -+ int last = mddev->raid_disks - 1; - -- for (mirror=0; mirror < mddev->raid_disks; mirror++) -+ if (rdev->raid_disk >= 0) -+ first = last = rdev->raid_disk; -+ -+ for (mirror = first; mirror <= last; mirror++) - if ( !(p=conf->mirrors+mirror)->rdev) { - - blk_queue_stack_limits(mddev->queue, - -diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c ---- .prev/drivers/md/raid5.c 2008-05-30 14:49:35.000000000 +1000 -+++ ./drivers/md/raid5.c 2008-06-10 10:27:51.000000000 +1000 -@@ -4399,21 +4399,27 @@ static int raid5_add_disk(mddev_t *mddev - int found = 0; - int disk; - struct disk_info *p; -+ int first = 0; -+ int last = conf->raid_disks - 1; - - if (mddev->degraded > conf->max_degraded) - /* no point adding a device */ - return 0; - -+ if (rdev->raid_disk >= 0) -+ first = last = rdev->raid_disk; -+ - /* - * find the disk ... but prefer rdev->saved_raid_disk - * if possible. - */ - if (rdev->saved_raid_disk >= 0 && -+ rdev->saved_raid_disk >= first && - conf->disks[rdev->saved_raid_disk].rdev == NULL) - disk = rdev->saved_raid_disk; - else -- disk = 0; -- for ( ; disk < conf->raid_disks; disk++) -+ disk = first; -+ for ( ; disk <= last ; disk++) - if ((p=conf->disks + disk)->rdev == NULL) { - clear_bit(In_sync, &rdev->flags); - rdev->raid_disk = disk; diff --git a/kernel-patch-2.6.27 b/kernel-patch-2.6.27 deleted file mode 100644 index 8d0785d..0000000 --- a/kernel-patch-2.6.27 +++ /dev/null @@ -1,36 +0,0 @@ -touch_mnt_namespace when the mount flags change - -From: Dan Williams - -Daemons that need to be launched while the rootfs is read-only can now -poll /proc/mounts to be notified when their O_RDWR requests may no -longer end in EROFS. - -Cc: Kay Sievers -Cc: Neil Brown -Signed-off-by: Dan Williams ---- - - fs/namespace.c | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - - -diff --git a/fs/namespace.c b/fs/namespace.c -index 6e283c9..1bd5ba2 100644 ---- a/fs/namespace.c -+++ b/fs/namespace.c -@@ -1553,8 +1553,13 @@ static noinline int do_remount(struct nameidata *nd, int flags, int mnt_flags, - if (!err) - nd->path.mnt->mnt_flags = mnt_flags; - up_write(&sb->s_umount); -- if (!err) -+ if (!err) { - security_sb_post_remount(nd->path.mnt, flags, data); -+ -+ spin_lock(&vfsmount_lock); -+ touch_mnt_namespace(nd->path.mnt->mnt_ns); -+ spin_unlock(&vfsmount_lock); -+ } - return err; - } - -- 2.7.4