diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-07 17:24:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-07 17:24:10 -0700 |
commit | 64c720add08ed48fc7655686c2de6969b043b4c0 (patch) | |
tree | 5c78f45d6089113f7e8f93fad22134646e42b15f /drivers/md/md.c | |
parent | 868b60e0550247fc83630070ff64bbfb803b2347 (diff) | |
parent | cd3de83f147601356395b57a8673e9c5ff1e59d1 (diff) | |
download | op-kernel-dev-64c720add08ed48fc7655686c2de6969b043b4c0.zip op-kernel-dev-64c720add08ed48fc7655686c2de6969b043b4c0.tar.gz |
Merge 3.16-rc4 into driver-core-next
We want the lz* fixes here to do more work with them.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 3484685..32fc19c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5599,7 +5599,7 @@ static int get_array_info(struct mddev * mddev, void __user * arg) if (mddev->in_sync) info.state = (1<<MD_SB_CLEAN); if (mddev->bitmap && mddev->bitmap_info.offset) - info.state = (1<<MD_SB_BITMAP_PRESENT); + info.state |= (1<<MD_SB_BITMAP_PRESENT); info.active_disks = insync; info.working_disks = working; info.failed_disks = failed; @@ -7501,6 +7501,19 @@ void md_do_sync(struct md_thread *thread) rdev->recovery_offset < j) j = rdev->recovery_offset; rcu_read_unlock(); + + /* If there is a bitmap, we need to make sure all + * writes that started before we added a spare + * complete before we start doing a recovery. + * Otherwise the write might complete and (via + * bitmap_endwrite) set a bit in the bitmap after the + * recovery has checked that bit and skipped that + * region. + */ + if (mddev->bitmap) { + mddev->pers->quiesce(mddev, 1); + mddev->pers->quiesce(mddev, 0); + } } printk(KERN_INFO "md: %s of RAID array %s\n", desc, mdname(mddev)); |