two minor bugfixes for md in 3.16.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIVAwUAU7XWTTnsnt1WYoG5AQJvuQ/+LkhIR5FoTURyqMzr8OIEwmljqS3spI/i XIrOvUhXjDtCQIZ5NPWETxuHGJ/064nEGYtMiteHx4/fzajI9v8XUM2KID/tpVwP Yv7ZNg1IDx2a0/8jPyWcEPw8Dg3YMFUrR0IpB3KfGpLQ3YjmDz1fS4iEihCFYBJz tf44JYYTVwOV5zCJt0sdc+GbtVkGO0/Wk8xqp4Fd+shYwIchOgadhjP0RBximQ2/ 5JIs7Kq8GaVjTyzehXetkp4/KmKJZWuFZ+Th5SWfoMkwn/bnkI7vpMm8wWE6wRDb 30iChnhdFkU29UAci/2iCHWQjwlhH+Cc8LCfHpXc5cz+QweIZZ+GsjHIv44TYXIw jAqY2OK3ZAteTgOtA64+dyY+c43TVG0NEp/tDQXACohaw0XPxw00NjH94SmThCA9 6SqEx3+8wMFbIu/8gohVbwUq3PFC+uaNQTurOklw5lA0Pb04aq7q8SHxi9yi3QUG Ch/SkEvCB0zBFs1U3jwaqC6c2SZReNsr0cQdcbNIsRESkvJkryQCDA6tYOm1zBXR 9zEkRDqPaSyGOnTzdF0ZUkCf/WjijMeDoNZfh/4dNgC2X4Wr6xHAXwBUqcXg+ED8 OUiLpNkv0cO4eY3Dr1HVQWsUoCIKqgFp+wTXSex8+1ndmtI4daSp9hLWNzS5IWpe yLwHhHbX3fs= =wZau -----END PGP SIGNATURE----- Merge tag 'md/3.16-fixes' of git://neil.brown.name/md Pull md bugfixes from Neil Brown: "Two minor bugfixes for md in 3.16" * tag 'md/3.16-fixes' of git://neil.brown.name/md: md: flush writes before starting a recovery. md: make sure GET_ARRAY_INFO ioctl reports correct "clean" status
This commit is contained in:
Коммит
77c4cf17ae
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче