|
@@ -1220,18 +1220,13 @@ static struct dm_thin_new_mapping *get_next_mapping(struct pool *pool)
|
|
|
static void ll_zero(struct thin_c *tc, struct dm_thin_new_mapping *m,
|
|
|
sector_t begin, sector_t end)
|
|
|
{
|
|
|
- int r;
|
|
|
struct dm_io_region to;
|
|
|
|
|
|
to.bdev = tc->pool_dev->bdev;
|
|
|
to.sector = begin;
|
|
|
to.count = end - begin;
|
|
|
|
|
|
- r = dm_kcopyd_zero(tc->pool->copier, 1, &to, 0, copy_complete, m);
|
|
|
- if (r < 0) {
|
|
|
- DMERR_LIMIT("dm_kcopyd_zero() failed");
|
|
|
- copy_complete(1, 1, m);
|
|
|
- }
|
|
|
+ dm_kcopyd_zero(tc->pool->copier, 1, &to, 0, copy_complete, m);
|
|
|
}
|
|
|
|
|
|
static void remap_and_issue_overwrite(struct thin_c *tc, struct bio *bio,
|
|
@@ -1257,7 +1252,6 @@ static void schedule_copy(struct thin_c *tc, dm_block_t virt_block,
|
|
|
struct dm_bio_prison_cell *cell, struct bio *bio,
|
|
|
sector_t len)
|
|
|
{
|
|
|
- int r;
|
|
|
struct pool *pool = tc->pool;
|
|
|
struct dm_thin_new_mapping *m = get_next_mapping(pool);
|
|
|
|
|
@@ -1296,19 +1290,8 @@ static void schedule_copy(struct thin_c *tc, dm_block_t virt_block,
|
|
|
to.sector = data_dest * pool->sectors_per_block;
|
|
|
to.count = len;
|
|
|
|
|
|
- r = dm_kcopyd_copy(pool->copier, &from, 1, &to,
|
|
|
- 0, copy_complete, m);
|
|
|
- if (r < 0) {
|
|
|
- DMERR_LIMIT("dm_kcopyd_copy() failed");
|
|
|
- copy_complete(1, 1, m);
|
|
|
-
|
|
|
- /*
|
|
|
- * We allow the zero to be issued, to simplify the
|
|
|
- * error path. Otherwise we'd need to start
|
|
|
- * worrying about decrementing the prepare_actions
|
|
|
- * counter.
|
|
|
- */
|
|
|
- }
|
|
|
+ dm_kcopyd_copy(pool->copier, &from, 1, &to,
|
|
|
+ 0, copy_complete, m);
|
|
|
|
|
|
/*
|
|
|
* Do we need to zero a tail region?
|