Add warnings if we ever fail to get a lock on the mapfile.

Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Doug Ledford 2010-07-20 17:42:26 -04:00
parent 0155af90d8
commit 93c861ee57
1 changed files with 6 additions and 2 deletions

View File

@ -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;