summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2010-07-20 23:42:26 +0200
committerDoug Ledford <dledford@redhat.com>2010-07-22 16:16:31 +0200
commit93c861ee5752896b340da51afb8ad4db95ae5e3b (patch)
treedc934c25d0bb6bfd10e485f05f9ef683a73485b3 /Incremental.c
parentBugfix: don't issue a read larger than the buffer to hold it (diff)
downloadmdadm-93c861ee5752896b340da51afb8ad4db95ae5e3b.tar.xz
mdadm-93c861ee5752896b340da51afb8ad4db95ae5e3b.zip
Add warnings if we ever fail to get a lock on the mapfile.
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--Incremental.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Incremental.c b/Incremental.c
index 35490e76..a8a072d4 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -294,7 +294,9 @@ int Incremental(char *devname, int verbose, int runstop,
/* 4/ Check if array exists.
*/
- map_lock(&map);
+ if (map_lock(&map))
+ fprintf(stderr, Name ": failed to get exclusive lock on "
+ "mapfile\n");
mp = map_by_uuid(&map, info.uuid);
if (mp)
mdfd = open_dev(mp->devnum);
@@ -793,7 +795,9 @@ int Incremental_container(struct supertype *st, char *devname, int verbose,
struct mdinfo *ra;
struct map_ent *map = NULL;
- map_lock(&map);
+ if (map_lock(&map))
+ fprintf(stderr, Name ": failed to get exclusive lock on "
+ "mapfile\n");
for (ra = list ; ra ; ra = ra->next) {
int mdfd;