>From 88bdb5e860bede6cbc09a52d56b502f0baf62925 Mon Sep 17 00:00:00 2001 From: Adam Kwolek <adam.kwolek@xxxxxxxxx> Date: Thu, 18 Feb 2010 11:25:21 +0100 Subject: [PATCH] OLCE: changes to meta update md_update_sb() Changes to be committed: modified: md.c For external meta some actions should be the same as for native meta except updating meta. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- drivers/md/md.c | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 83e6852..fce7d44 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1965,8 +1965,16 @@ static void md_update_sb(mddev_t * mddev, int force_change) int nospares = 0; mddev->utime = get_seconds(); - if (mddev->external) + + /* for reshape on external meta only */ + if ((mddev->external) && + !test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { + /* for external meta md_allow_write() should proceed */ + clear_bit(MD_CHANGE_CLEAN, &mddev->flags); + return; + } + repeat: spin_lock_irq(&mddev->write_lock); @@ -2030,11 +2038,23 @@ repeat: /* * do not write anything to disk if using * nonpersistent superblocks + * and + * for external meta and reshape + * we can get here also */ - if (!mddev->persistent) { + if (!mddev->persistent || + mddev->external) { if (!mddev->external) clear_bit(MD_CHANGE_PENDING, &mddev->flags); + /* OLCE: reshape for external meta */ + if (mddev->external && + test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { + /* for external meta clean MD_CHANGE_PENDING flag + * as changes will be made by user space code + */ + clear_bit(MD_CHANGE_PENDING, &mddev->flags); + } spin_unlock_irq(&mddev->write_lock); wake_up(&mddev->sb_wait); return; -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html