diff options
author | NeilBrown <neilb@suse.de> | 2013-07-10 11:10:54 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-07-10 11:10:54 +1000 |
commit | a7a0d8a116c11b2208e70fd4dcc8ab920e472b8b (patch) | |
tree | d94673f83ff101594347bbc2450698d0dc688493 /mdstat.c | |
parent | b4924f46c04262e7e80aac27acc5848066393c52 (diff) |
Grow: use mdstat_wait to wait for delayed reshape.
Having a fix time for a wait is clumsy and can make us
wait much too long.
So use mdstat_wait and keep the mdstat_fd open.
This requires an 'mdstat_close' so it doesn't stay open
forever.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdstat.c')
-rw-r--r-- | mdstat.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -289,6 +289,13 @@ struct mdstat_ent *mdstat_read(int hold, int start) return rv; } +void mdstat_close(void) +{ + if (mdstat_fd >= 0) + close(mdstat_fd); + mdstat_fd = -1; +} + void mdstat_wait(int seconds) { fd_set fds; |