summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-04 20:50:39 +1100
committerNeilBrown <neilb@suse.de>2008-11-04 20:50:39 +1100
commitad5bc697ad9bb52616c34b022fb014e890be6a2d (patch)
treec8c8905f29d993f4b3bcf7f449c249c4d9f21337 /mdadm.h
parent7e6c6cb26790e4b0de2e8694cca655db26bee11a (diff)
downloadmdadm-ad5bc697ad9bb52616c34b022fb014e890be6a2d.tar.gz
mdadm-ad5bc697ad9bb52616c34b022fb014e890be6a2d.tar.xz
mdadm-ad5bc697ad9bb52616c34b022fb014e890be6a2d.zip
Incremental: lock against multiple concurrent additions to an array.
In two devices are added via -I to one array at the same time, mdadm can get badly confused. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index dd33116..bc12d68 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -325,6 +325,8 @@ extern void map_delete(struct map_ent **mapp, int devnum);
extern void map_free(struct map_ent *map);
extern void map_add(struct map_ent **melp,
int devnum, char *metadata, int uuid[4], char *path);
+extern int map_lock(struct map_ent **melp);
+extern void map_unlock(struct map_ent **melp);
/* various details can be requested */
#define GET_LEVEL 1