Skip to content

Commit

Permalink
dm space map metadata: limit errors in sm_metadata_new_block
Browse files Browse the repository at this point in the history
The "unable to allocate new metadata block" error can be a particularly
verbose error if there is a systemic issue with the metadata device.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
  • Loading branch information
Mike Snitzer committed Jan 7, 2014
1 parent 4206546 commit c46985e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/persistent-data/dm-space-map-metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,13 @@ static int sm_metadata_new_block(struct dm_space_map *sm, dm_block_t *b)

int r = sm_metadata_new_block_(sm, b);
if (r) {
DMERR("unable to allocate new metadata block");
DMERR_LIMIT("unable to allocate new metadata block");
return r;
}

r = sm_metadata_get_nr_free(sm, &count);
if (r) {
DMERR("couldn't get free block count");
DMERR_LIMIT("couldn't get free block count");
return r;
}

Expand Down

0 comments on commit c46985e

Please sign in to comment.