Rename cell_defer_except() to cell_defer_no_holder() which describes its function more clearly.
Unified · Split
| @@ -526,7 +526,7 @@ static void cell_defer(struct thin_c *tc, struct dm_bio_prison_cell *cell, · 525 unmodified lines | ||
| 526 | 526 | /* |
| 527 | 527 | * Same as cell_defer except it omits the original holder of the cell. |
| 528 | 528 | */ |
| 529 | −static void cell_defer_except(struct thin_c *tc, struct dm_bio_prison_cell *cell) | |
| 529 | +static void cell_defer_no_holder(struct thin_c *tc, struct dm_bio_prison_cell *cell) | |
| 530 | 530 | { |
| 531 | 531 | struct bio_list bios; |
| 532 | 532 | struct pool *pool = tc->pool; |
| @@ -583,7 +583,7 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m) · 50 unmodified lines | ||
| 583 | 583 | * the bios in the cell. |
| 584 | 584 | */ |
| 585 | 585 | if (bio) { |
| 586 | − cell_defer_except(tc, m->cell); | |
| 586 | + cell_defer_no_holder(tc, m->cell); | |
| 587 | 587 | bio_endio(bio, 0); |
| 588 | 588 | } else |
| 589 | 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) · 8 unmodified lines | ||
| 598 | 598 | struct thin_c *tc = m->tc; |
| 599 | 599 | |
| 600 | 600 | bio_io_error(m->bio); |
| 601 | − cell_defer_except(tc, m->cell); | |
| 602 | − cell_defer_except(tc, m->cell2); | |
| 601 | + cell_defer_no_holder(tc, m->cell); | |
| 602 | + cell_defer_no_holder(tc, m->cell2); | |
| 603 | 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) · 2 unmodified lines | ||
| 608 | 608 | struct thin_c *tc = m->tc; |
| 609 | 609 | |
| 610 | 610 | inc_all_io_entry(tc->pool, m->bio); |
| 611 | − cell_defer_except(tc, m->cell); | |
| 612 | − cell_defer_except(tc, m->cell2); | |
| 611 | + cell_defer_no_holder(tc, m->cell); | |
| 612 | + cell_defer_no_holder(tc, m->cell2); | |
| 613 | 613 | |
| 614 | 614 | if (m->pass_discard) |
| 615 | 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) · 334 unmodified lines | ||
| 950 | 950 | */ |
| 951 | 951 | build_data_key(tc->td, lookup_result.block, &key2); |
| 952 | 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 | 954 | break; |
| 955 | 955 | } |
| 956 | 956 | |
| @@ -977,8 +977,8 @@ static void process_discard(struct thin_c *tc, struct bio *bio) · 20 unmodified lines | ||
| 977 | 977 | } |
| 978 | 978 | } else { |
| 979 | 979 | inc_all_io_entry(pool, bio); |
| 980 | − cell_defer_except(tc, cell); | |
| 981 | − cell_defer_except(tc, cell2); | |
| 980 | + cell_defer_no_holder(tc, cell); | |
| 981 | + cell_defer_no_holder(tc, cell2); | |
| 982 | 982 | |
| 983 | 983 | /* |
| 984 | 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) · 11 unmodified lines | ||
| 996 | 996 | /* |
| 997 | 997 | * It isn't provisioned, just forget it. |
| 998 | 998 | */ |
| 999 | − cell_defer_except(tc, cell); | |
| 999 | + cell_defer_no_holder(tc, cell); | |
| 1000 | 1000 | bio_endio(bio, 0); |
| 1001 | 1001 | break; |
| 1002 | 1002 | |
| 1003 | 1003 | default: |
| 1004 | 1004 | DMERR("discard: find block unexpectedly returned %d", r); |
| 1005 | − cell_defer_except(tc, cell); | |
| 1005 | + cell_defer_no_holder(tc, cell); | |
| 1006 | 1006 | bio_io_error(bio); |
| 1007 | 1007 | break; |
| 1008 | 1008 | } |
| @@ -1057,7 +1057,7 @@ static void process_shared_bio(struct thin_c *tc, struct bio *bio, · 48 unmodified lines | ||
| 1057 | 1057 | |
| 1058 | 1058 | h->shared_read_entry = dm_deferred_entry_inc(pool->shared_read_ds); |
| 1059 | 1059 | inc_all_io_entry(pool, bio); |
| 1060 | − cell_defer_except(tc, cell); | |
| 1060 | + cell_defer_no_holder(tc, cell); | |
| 1061 | 1061 | |
| 1062 | 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 · 10 unmodified lines | ||
| 1074 | 1074 | */ |
| 1075 | 1075 | if (!bio->bi_size) { |
| 1076 | 1076 | inc_all_io_entry(tc->pool, bio); |
| 1077 | − cell_defer_except(tc, cell); | |
| 1077 | + cell_defer_no_holder(tc, cell); | |
| 1078 | 1078 | |
| 1079 | 1079 | remap_and_issue(tc, bio, 0); |
| 1080 | 1080 | return; |
| @@ -1085,7 +1085,7 @@ static void provision_block(struct thin_c *tc, struct bio *bio, dm_block_t block · 4 unmodified lines | ||
| 1085 | 1085 | */ |
| 1086 | 1086 | if (bio_data_dir(bio) == READ) { |
| 1087 | 1087 | zero_fill_bio(bio); |
| 1088 | − cell_defer_except(tc, cell); | |
| 1088 | + cell_defer_no_holder(tc, cell); | |
| 1089 | 1089 | bio_endio(bio, 0); |
| 1090 | 1090 | return; |
| 1091 | 1091 | } |
| @@ -1132,10 +1132,10 @@ static void process_bio(struct thin_c *tc, struct bio *bio) · 40 unmodified lines | ||
| 1132 | 1132 | case 0: |
| 1133 | 1133 | if (lookup_result.shared) { |
| 1134 | 1134 | process_shared_bio(tc, bio, block, &lookup_result); |
| 1135 | − cell_defer_except(tc, cell); | |
| 1135 | + cell_defer_no_holder(tc, cell); | |
| 1136 | 1136 | } else { |
| 1137 | 1137 | inc_all_io_entry(tc->pool, bio); |
| 1138 | − cell_defer_except(tc, cell); | |
| 1138 | + cell_defer_no_holder(tc, cell); | |
| 1139 | 1139 | |
| 1140 | 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) · 2 unmodified lines | ||
| 1144 | 1144 | case -ENODATA: |
| 1145 | 1145 | if (bio_data_dir(bio) == READ && tc->origin_dev) { |
| 1146 | 1146 | inc_all_io_entry(tc->pool, bio); |
| 1147 | − cell_defer_except(tc, cell); | |
| 1147 | + cell_defer_no_holder(tc, cell); | |
| 1148 | 1148 | |
| 1149 | 1149 | remap_to_origin_and_issue(tc, bio); |
| 1150 | 1150 | } else |
| @@ -1153,7 +1153,7 @@ static void process_bio(struct thin_c *tc, struct bio *bio) · 2 unmodified lines | ||
| 1153 | 1153 | |
| 1154 | 1154 | default: |
| 1155 | 1155 | DMERR("dm_thin_find_block() failed, error = %d", r); |
| 1156 | − cell_defer_except(tc, cell); | |
| 1156 | + cell_defer_no_holder(tc, cell); | |
| 1157 | 1157 | bio_io_error(bio); |
| 1158 | 1158 | break; |
| 1159 | 1159 | } |
| @@ -1429,13 +1429,13 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio, · 269 unmodified lines | ||
| 1429 | 1429 | |
| 1430 | 1430 | build_data_key(tc->td, result.block, &key); |
| 1431 | 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 | 1433 | return DM_MAPIO_SUBMITTED; |
| 1434 | 1434 | } |
| 1435 | 1435 | |
| 1436 | 1436 | inc_all_io_entry(tc->pool, bio); |
| 1437 | − cell_defer_except(tc, cell2); | |
| 1438 | − cell_defer_except(tc, cell1); | |
| 1437 | + cell_defer_no_holder(tc, cell2); | |
| 1438 | + cell_defer_no_holder(tc, cell1); | |
| 1439 | 1439 | |
| 1440 | 1440 | remap(tc, bio, result.block); |
| 1441 | 1441 | return DM_MAPIO_REMAPPED; |