From: NeilBrown Date: Fri, 21 May 2010 22:31:36 +0000 (+1000) Subject: Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19fdb9eefb21b72edbc365b838502780c392bad6;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus Conflicts: drivers/md/md.c - Resolved conflict in md_update_sb - Added extra 'NULL' arg to new instance of sysfs_get_dirent. Signed-off-by: NeilBrown --- 19fdb9eefb21b72edbc365b838502780c392bad6 diff --cc drivers/md/md.c index 26b3d2879d93,a9fd491796ac..46b3a044eadf --- a/drivers/md/md.c +++ b/drivers/md/md.c @@@ -3019,37 -2980,6 +3020,37 @@@ level_store(mddev_t *mddev, const char /* Looks like we have a winner */ mddev_suspend(mddev); mddev->pers->stop(mddev); + + if (mddev->pers->sync_request == NULL && + pers->sync_request != NULL) { + /* need to add the md_redundancy_group */ + if (sysfs_create_group(&mddev->kobj, &md_redundancy_group)) + printk(KERN_WARNING + "md: cannot register extra attributes for %s\n", + mdname(mddev)); - mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, "sync_action"); ++ mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, NULL, "sync_action"); + } + if (mddev->pers->sync_request != NULL && + pers->sync_request == NULL) { + /* need to remove the md_redundancy_group */ + if (mddev->to_remove == NULL) + mddev->to_remove = &md_redundancy_group; + } + + if (mddev->pers->sync_request == NULL && + mddev->external) { + /* We are converting from a no-redundancy array + * to a redundancy array and metadata is managed + * externally so we need to be sure that writes + * won't block due to a need to transition + * clean->dirty + * until external management is started. + */ + mddev->in_sync = 0; + mddev->safemode_delay = 0; + mddev->safemode = 0; + } + module_put(mddev->pers->owner); /* Invalidate devices that are now superfluous */ list_for_each_entry(rdev, &mddev->disks, same_set) diff --cc drivers/md/raid0.c index dc38c1a45166,c3bec024612e..e70f004c99e8 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@@ -20,9 -20,9 +20,10 @@@ #include #include + #include #include "md.h" #include "raid0.h" +#include "raid5.h" static void raid0_unplug(struct request_queue *q) { diff --cc drivers/md/raid5.c index eacf02a6ec5f,15348c393b5d..9ea17d6c799b --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@@ -50,9 -50,9 +50,10 @@@ #include #include #include + #include #include "md.h" #include "raid5.h" +#include "raid0.h" #include "bitmap.h" /*