]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/md-update-size
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / md-update-size
CommitLineData
2cb7cef9
BS
1From: NeilBrown <neilb@suse.de>
2References: bnc#509495
3Subject: Update size of md device as soon as it is successfully assemble.
4
5It is import that we get the size of an md device 'right' before
6generating the KOBJ_CHANGE message. If we don't, then if a program
7runs as a result of that message and open the md device before the
8mdadm which created the device closes it, the new program will see a
9size of zero which will be confusing.
10
11So call revalidate_disk, which checks and updates the size.
12
13Signed-off-by: NeilBrown <neilb@suse.de>
14
15---
16 drivers/md/md.c | 1 +
17 1 file changed, 1 insertion(+)
18
19--- linux-2.6.27-SLE11_BRANCH.orig/drivers/md/md.c
20+++ linux-2.6.27-SLE11_BRANCH/drivers/md/md.c
21@@ -3892,6 +3892,7 @@ static int do_md_run(mddev_t * mddev)
22 md_wakeup_thread(mddev->thread);
23 md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */
24
25+ revalidate_disk(mddev->gendisk);
26 mddev->changed = 1;
27 md_new_event(mddev);
28 sysfs_notify(&mddev->kobj, NULL, "array_state");