]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: NeilBrown <neilb@suse.de> |
2 | References: bnc#509495 | |
3 | Subject: Update size of md device as soon as it is successfully assemble. | |
4 | ||
5 | It is import that we get the size of an md device 'right' before | |
6 | generating the KOBJ_CHANGE message. If we don't, then if a program | |
7 | runs as a result of that message and open the md device before the | |
8 | mdadm which created the device closes it, the new program will see a | |
9 | size of zero which will be confusing. | |
10 | ||
11 | So call revalidate_disk, which checks and updates the size. | |
12 | ||
13 | Signed-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"); |