diff options
author | Neil Brown <neilb@suse.de> | 2006-12-21 07:10:52 +0100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-12-21 07:10:52 +0100 |
commit | 8382f19bdcc6d2d1de92154e11129acdcaab10fa (patch) | |
tree | 3b3c93a6ad6189d6354de81714fc8959de8378f5 /mdstat.c | |
parent | Centralise code for copying uuid (diff) | |
download | mdadm-8382f19bdcc6d2d1de92154e11129acdcaab10fa.tar.xz mdadm-8382f19bdcc6d2d1de92154e11129acdcaab10fa.zip |
Add new mode: --incremental
--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.
Diffstat (limited to 'mdstat.c')
-rw-r--r-- | mdstat.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -251,3 +251,15 @@ void mdstat_wait(int seconds) tm.tv_usec = 0; select(mdstat_fd >2 ? mdstat_fd+1:3, NULL, NULL, &fds, &tm); } + +int mddev_busy(int devnum) +{ + struct mdstat_ent *mdstat = mdstat_read(0, 0); + struct mdstat_ent *me; + + for (me = mdstat ; me ; me = me->next) + if (me->devnum == devnum) + break; + free_mdstat(mdstat); + return me != NULL; +} |