aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2012-12-21 15:23:33 -0500
committerAlasdair G Kergon <agk@redhat.com>2012-12-21 15:23:33 -0500
commitf286ba0eede3d8f211e6029c2b52f2dbee7d7d35 (patch)
tree8f21c0973f2d0fb326834a03fb235f2cafd34ec4 /drivers
parent9aa0c0e60ffc2594acaad23127dbea9f3b61821c (diff)
dm thin: rename cell_defer_except to cell_defer_no_holder
Rename cell_defer_except() to cell_defer_no_holder() which describes its function more clearly. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-thin.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 063fe04e60e9..2cb81bf3a8e3 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -526,7 +526,7 @@ static void cell_defer(struct thin_c *tc, struct dm_bio_prison_cell *cell,
526/* 526/*
527 * Same as cell_defer except it omits the original holder of the cell. 527 * Same as cell_defer except it omits the original holder of the cell.
528 */ 528 */
529static void cell_defer_except(struct thin_c *tc, struct dm_bio_prison_cell *cell) 529static void cell_defer_no_holder(struct thin_c *tc, struct dm_bio_prison_cell *cell)
530{ 530{
531 struct bio_list bios; 531 struct bio_list bios;
532 struct pool *pool = tc->pool; 532 struct pool *pool = tc->pool;
@@ -583,7 +583,7 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m)
583 * the bios in the cell. 583 * the bios in the cell.
584 */ 584 */
585 if (bio) { 585 if (bio) {
586 cell_defer_except(tc, m->cell); 586 cell_defer_no_holder(tc, m->cell);
587 bio_endio(bio, 0); 587 bio_endio(bio, 0);
588 } else 588 } else
589 cell_defer(tc, m->cell, m->data_block); 589 cell_defer(tc, m->cell, m->data_block);
@@ -598,8 +598,8 @@ static void process_prepared_discard_fail(struct dm_thin_new_mapping *m)
598 struct thin_c *tc = m->tc; 598 struct thin_c *tc = m->tc;
599 599
600 bio_io_error(m->bio); 600 bio_io_error(m->bio);
601 cell_defer_except(tc, m->cell); 601 cell_defer_no_holder(tc, m->cell);
602 cell_defer_except(tc, m->cell2); 602 cell_defer_no_holder(tc, m->cell2);
603 mempool_free(m, tc->pool->mapping_pool); 603 mempool_free(m, tc->pool->mapping_pool);
604} 604}
605 605
@@ -608,8 +608,8 @@ static void process_prepared_discard_passdown(struct dm_thin_new_mapping *m)
608 struct thin_c *tc = m->tc; 608 struct thin_c *tc = m->tc;
609 609
610 inc_all_io_entry(tc->pool, m->bio); 610 inc_all_io_entry(tc->pool, m->bio);
611 cell_defer_except(tc, m->cell); 611 cell_defer_no_holder(tc, m->cell);
612 cell_defer_except(tc, m->cell2); 612 cell_defer_no_holder(tc, m->cell2);
613 613
614 if (m->pass_discard) 614 if (m->pass_discard)
615 remap_and_issue(tc, m->bio, m->data_block); 615 remap_and_issue(tc, m->bio, m->data_block);
@@ -950,7 +950,7 @@ static void process_discard(struct thin_c *tc, struct bio *bio)
950 */ 950 */
951 build_data_key(tc->td, lookup_result.block, &key2); 951 build_data_key(tc->td, lookup_result.block, &key2);
952 if (dm_bio_detain(tc->pool->prison, &key2, bio, &cell2)) { 952 if (dm_bio_detain(tc->pool->prison, &key2, bio, &cell2)) {
953 cell_defer_except(tc, cell); 953 cell_defer_no_holder(tc, cell);
954 break; 954 break;
955 } 955 }
956 956
@@ -977,8 +977,8 @@ static void process_discard(struct thin_c *tc, struct bio *bio)
977 } 977 }
978 } else { 978 } else {
979 inc_all_io_entry(pool, bio); 979 inc_all_io_entry(pool, bio);
980 cell_defer_except(tc, cell); 980 cell_defer_no_holder(tc, cell);
981 cell_defer_except(tc, cell2); 981 cell_defer_no_holder(tc, cell2);
982 982
983 /* 983 /*
984 * The DM core makes sure that the discard doesn't span 984 * The DM core makes sure that the discard doesn't span
@@ -996,13 +996,13 @@ static void process_discard(struct thin_c *tc, struct bio *bio)
996 /* 996 /*
997 * It isn't provisioned, just forget it. 997 * It isn't provisioned, just forget it.
998 */ 998 */
999 cell_defer_except(tc, cell); 999 cell_defer_no_holder(tc, cell);
1000 bio_endio(bio, 0); 1000 bio_endio(bio, 0);
1001 break; 1001 break;
1002 1002
1003 default: 1003 default:
1004 DMERR("discard: find block unexpectedly returned %d", r); 1004 DMERR("discard: find block unexpectedly returned %d", r);
1005 cell_defer_except(tc, cell); 1005 cell_defer_no_holder(tc, cell);
1006 bio_io_error(bio); 1006 bio_io_error(bio);
1007 break; 1007 break;
1008 } 1008 }
@@ -1057,7 +1057,7 @@ static void process_shared_bio(struct thin_c *tc, struct bio *bio,
1057 1057
1058 h->shared_read_entry = dm_deferred_entry_inc(pool->shared_read_ds); 1058 h->shared_read_entry = dm_deferred_entry_inc(pool->shared_read_ds);
1059 inc_all_io_entry(pool, bio); 1059 inc_all_io_entry(pool, bio);
1060 cell_defer_except(tc, cell); 1060 cell_defer_no_holder(tc, cell);
1061 1061
1062 remap_and_issue(tc, bio, lookup_result->block); 1062 remap_and_issue(tc, bio, lookup_result->block);
1063 } 1063 }
@@ -1074,7 +1074,7 @@ static void provision_block(struct thin_c *tc, struct bio *bio, dm_block_t block
1074 */ 1074 */
1075 if (!bio->bi_size) { 1075 if (!bio->bi_size) {
1076 inc_all_io_entry(tc->pool, bio); 1076 inc_all_io_entry(tc->pool, bio);
1077 cell_defer_except(tc, cell); 1077 cell_defer_no_holder(tc, cell);
1078 1078
1079 remap_and_issue(tc, bio, 0); 1079 remap_and_issue(tc, bio, 0);
1080 return; 1080 return;
@@ -1085,7 +1085,7 @@ static void provision_block(struct thin_c *tc, struct bio *bio, dm_block_t block
1085 */ 1085 */
1086 if (bio_data_dir(bio) == READ) { 1086 if (bio_data_dir(bio) == READ) {
1087 zero_fill_bio(bio); 1087 zero_fill_bio(bio);
1088 cell_defer_except(tc, cell); 1088 cell_defer_no_holder(tc, cell);
1089 bio_endio(bio, 0); 1089 bio_endio(bio, 0);
1090 return; 1090 return;
1091 } 1091 }
@@ -1132,10 +1132,10 @@ static void process_bio(struct thin_c *tc, struct bio *bio)
1132 case 0: 1132 case 0:
1133 if (lookup_result.shared) { 1133 if (lookup_result.shared) {
1134 process_shared_bio(tc, bio, block, &lookup_result); 1134 process_shared_bio(tc, bio, block, &lookup_result);
1135 cell_defer_except(tc, cell); 1135 cell_defer_no_holder(tc, cell);
1136 } else { 1136 } else {
1137 inc_all_io_entry(tc->pool, bio); 1137 inc_all_io_entry(tc->pool, bio);
1138 cell_defer_except(tc, cell); 1138 cell_defer_no_holder(tc, cell);
1139 1139
1140 remap_and_issue(tc, bio, lookup_result.block); 1140 remap_and_issue(tc, bio, lookup_result.block);
1141 } 1141 }
@@ -1144,7 +1144,7 @@ static void process_bio(struct thin_c *tc, struct bio *bio)
1144 case -ENODATA: 1144 case -ENODATA:
1145 if (bio_data_dir(bio) == READ && tc->origin_dev) { 1145 if (bio_data_dir(bio) == READ && tc->origin_dev) {
1146 inc_all_io_entry(tc->pool, bio); 1146 inc_all_io_entry(tc->pool, bio);
1147 cell_defer_except(tc, cell); 1147 cell_defer_no_holder(tc, cell);
1148 1148
1149 remap_to_origin_and_issue(tc, bio); 1149 remap_to_origin_and_issue(tc, bio);
1150 } else 1150 } else
@@ -1153,7 +1153,7 @@ static void process_bio(struct thin_c *tc, struct bio *bio)
1153 1153
1154 default: 1154 default:
1155 DMERR("dm_thin_find_block() failed, error = %d", r); 1155 DMERR("dm_thin_find_block() failed, error = %d", r);
1156 cell_defer_except(tc, cell); 1156 cell_defer_no_holder(tc, cell);
1157 bio_io_error(bio); 1157 bio_io_error(bio);
1158 break; 1158 break;
1159 } 1159 }
@@ -1429,13 +1429,13 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio,
1429 1429
1430 build_data_key(tc->td, result.block, &key); 1430 build_data_key(tc->td, result.block, &key);
1431 if (dm_bio_detain(tc->pool->prison, &key, bio, &cell2)) { 1431 if (dm_bio_detain(tc->pool->prison, &key, bio, &cell2)) {
1432 cell_defer_except(tc, cell1); 1432 cell_defer_no_holder(tc, cell1);
1433 return DM_MAPIO_SUBMITTED; 1433 return DM_MAPIO_SUBMITTED;
1434 } 1434 }
1435 1435
1436 inc_all_io_entry(tc->pool, bio); 1436 inc_all_io_entry(tc->pool, bio);
1437 cell_defer_except(tc, cell2); 1437 cell_defer_no_holder(tc, cell2);
1438 cell_defer_except(tc, cell1); 1438 cell_defer_no_holder(tc, cell1);
1439 1439
1440 remap(tc, bio, result.block); 1440 remap(tc, bio, result.block);
1441 return DM_MAPIO_REMAPPED; 1441 return DM_MAPIO_REMAPPED;