Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347956
b: refs/heads/master
c: c397741
h: refs/heads/master
v: v3
  • Loading branch information
Mike Snitzer authored and Alasdair G Kergon committed Dec 21, 2012
1 parent c42b40e commit a38b4f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89ddeb8cb1383bfdfaaeb458f1c4a91e890cc60b
refs/heads/master: c397741c7645de7f2ead1f076f1a40e169875fe3
25 changes: 15 additions & 10 deletions trunk/drivers/md/dm-thin.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m)
*/
r = dm_thin_insert_block(tc->td, m->virt_block, m->data_block);
if (r) {
DMERR("dm_thin_insert_block() failed");
DMERR_LIMIT("dm_thin_insert_block() failed");
dm_cell_error(m->cell);
goto out;
}
Expand Down Expand Up @@ -622,7 +622,7 @@ static void process_prepared_discard(struct dm_thin_new_mapping *m)

r = dm_thin_remove_block(tc->td, m->virt_block);
if (r)
DMERR("dm_thin_remove_block() failed");
DMERR_LIMIT("dm_thin_remove_block() failed");

process_prepared_discard_passdown(m);
}
Expand Down Expand Up @@ -736,7 +736,7 @@ static void schedule_copy(struct thin_c *tc, dm_block_t virt_block,
0, copy_complete, m);
if (r < 0) {
mempool_free(m, pool->mapping_pool);
DMERR("dm_kcopyd_copy() failed");
DMERR_LIMIT("dm_kcopyd_copy() failed");
dm_cell_error(cell);
}
}
Expand Down Expand Up @@ -802,7 +802,7 @@ static void schedule_zero(struct thin_c *tc, dm_block_t virt_block,
r = dm_kcopyd_zero(pool->copier, 1, &to, 0, copy_complete, m);
if (r < 0) {
mempool_free(m, pool->mapping_pool);
DMERR("dm_kcopyd_zero() failed");
DMERR_LIMIT("dm_kcopyd_zero() failed");
dm_cell_error(cell);
}
}
Expand All @@ -814,7 +814,7 @@ static int commit(struct pool *pool)

r = dm_pool_commit_metadata(pool->pmd);
if (r)
DMERR("commit failed, error = %d", r);
DMERR_LIMIT("commit failed: error = %d", r);

return r;
}
Expand Down Expand Up @@ -997,7 +997,8 @@ static void process_discard(struct thin_c *tc, struct bio *bio)
break;

default:
DMERR("discard: find block unexpectedly returned %d", r);
DMERR_LIMIT("%s: dm_thin_find_block() failed: error = %d",
__func__, r);
cell_defer_no_holder(tc, cell);
bio_io_error(bio);
break;
Expand All @@ -1024,7 +1025,8 @@ static void break_sharing(struct thin_c *tc, struct bio *bio, dm_block_t block,
break;

default:
DMERR("%s: alloc_data_block() failed, error = %d", __func__, r);
DMERR_LIMIT("%s: alloc_data_block() failed: error = %d",
__func__, r);
dm_cell_error(cell);
break;
}
Expand Down Expand Up @@ -1100,7 +1102,8 @@ static void provision_block(struct thin_c *tc, struct bio *bio, dm_block_t block
break;

default:
DMERR("%s: alloc_data_block() failed, error = %d", __func__, r);
DMERR_LIMIT("%s: alloc_data_block() failed: error = %d",
__func__, r);
set_pool_mode(tc->pool, PM_READ_ONLY);
dm_cell_error(cell);
break;
Expand Down Expand Up @@ -1148,7 +1151,8 @@ static void process_bio(struct thin_c *tc, struct bio *bio)
break;

default:
DMERR("dm_thin_find_block() failed, error = %d", r);
DMERR_LIMIT("%s: dm_thin_find_block() failed: error = %d",
__func__, r);
cell_defer_no_holder(tc, cell);
bio_io_error(bio);
break;
Expand Down Expand Up @@ -1190,7 +1194,8 @@ static void process_bio_read_only(struct thin_c *tc, struct bio *bio)
break;

default:
DMERR("dm_thin_find_block() failed, error = %d", r);
DMERR_LIMIT("%s: dm_thin_find_block() failed: error = %d",
__func__, r);
bio_io_error(bio);
break;
}
Expand Down

0 comments on commit a38b4f5

Please sign in to comment.