diff options
author | NeilBrown <neilb@suse.de> | 2009-04-07 17:34:38 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-04-07 17:34:38 +1000 |
commit | a7c6e3fb24f8335005a6ff8e0eb668faa257c941 (patch) | |
tree | 586861457108a56d57ffb64ea2672514e89a1c74 /Assemble.c | |
parent | b1b12d58194e42208e4828ea5818279c00a0ed18 (diff) | |
download | mdadm-a7c6e3fb24f8335005a6ff8e0eb668faa257c941.tar.gz mdadm-a7c6e3fb24f8335005a6ff8e0eb668faa257c941.tar.xz mdadm-a7c6e3fb24f8335005a6ff8e0eb668faa257c941.zip |
wait_for improvement.
wait not only for the name to appear, but for it to refer to the
correct device.
Sometimes old symlinks left lying around can be confusing.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1069,7 +1069,7 @@ int Assemble(struct supertype *st, char *mddev, fprintf(stderr, "\n"); } sysfs_uevent(content, "change"); - wait_for(chosen_name); + wait_for(chosen_name, mdfd); close(mdfd); return 0; } @@ -1104,8 +1104,8 @@ int Assemble(struct supertype *st, char *mddev, (4 * content->array.chunk_size / 4096) + 1); } } + wait_for(mddev, mdfd); close(mdfd); - wait_for(mddev); if (auto_assem) { int usecs = 1; /* There is a nasty race with 'mdadm --monitor'. @@ -1276,7 +1276,7 @@ int assemble_container_content(struct supertype *st, int mdfd, fprintf(stderr, "\n"); } if (!err) - wait_for(chosen_name); + wait_for(chosen_name, mdfd); close(mdfd); return 0; /* FIXME should have an O_EXCL and wait for read-auto */ |