History

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.

Joe Thornber committed 13 years ago

Commit f286ba01 parent 9aa0c0e1 file · +21 −21Browse files

Unified · Split

drivers/md/dm-thin.c+21−21
@@ -526,7 +526,7 @@ static void cell_defer(struct thin_c *tc, struct dm_bio_prison_cell *cell, · 525 unmodified lines
526526 /*
527527 * Same as cell_defer except it omits the original holder of the cell.
528528 */
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)
530530 {
531531 struct bio_list bios;
532532 struct pool *pool = tc->pool;
@@ -583,7 +583,7 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m) · 50 unmodified lines
583583 * the bios in the cell.
584584 */
585585 if (bio) {
586− cell_defer_except(tc, m->cell);
586+ cell_defer_no_holder(tc, m->cell);
587587 bio_endio(bio, 0);
588588 } else
589589 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
598598 struct thin_c *tc = m->tc;
599599
600600 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);
603603 mempool_free(m, tc->pool->mapping_pool);
604604 }
605605
@@ -608,8 +608,8 @@ static void process_prepared_discard_passdown(struct dm_thin_new_mapping *m) · 2 unmodified lines
608608 struct thin_c *tc = m->tc;
609609
610610 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);
613613
614614 if (m->pass_discard)
615615 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
950950 */
951951 build_data_key(tc->td, lookup_result.block, &key2);
952952 if (dm_bio_detain(tc->pool->prison, &key2, bio, &cell2)) {
953− cell_defer_except(tc, cell);
953+ cell_defer_no_holder(tc, cell);
954954 break;
955955 }
956956
@@ -977,8 +977,8 @@ static void process_discard(struct thin_c *tc, struct bio *bio) · 20 unmodified lines
977977 }
978978 } else {
979979 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);
982982
983983 /*
984984 * 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
996996 /*
997997 * It isn't provisioned, just forget it.
998998 */
999− cell_defer_except(tc, cell);
999+ cell_defer_no_holder(tc, cell);
10001000 bio_endio(bio, 0);
10011001 break;
10021002
10031003 default:
10041004 DMERR("discard: find block unexpectedly returned %d", r);
1005− cell_defer_except(tc, cell);
1005+ cell_defer_no_holder(tc, cell);
10061006 bio_io_error(bio);
10071007 break;
10081008 }
@@ -1057,7 +1057,7 @@ static void process_shared_bio(struct thin_c *tc, struct bio *bio, · 48 unmodified lines
10571057
10581058 h->shared_read_entry = dm_deferred_entry_inc(pool->shared_read_ds);
10591059 inc_all_io_entry(pool, bio);
1060− cell_defer_except(tc, cell);
1060+ cell_defer_no_holder(tc, cell);
10611061
10621062 remap_and_issue(tc, bio, lookup_result->block);
10631063 }
@@ -1074,7 +1074,7 @@ static void provision_block(struct thin_c *tc, struct bio *bio, dm_block_t block · 10 unmodified lines
10741074 */
10751075 if (!bio->bi_size) {
10761076 inc_all_io_entry(tc->pool, bio);
1077− cell_defer_except(tc, cell);
1077+ cell_defer_no_holder(tc, cell);
10781078
10791079 remap_and_issue(tc, bio, 0);
10801080 return;
@@ -1085,7 +1085,7 @@ static void provision_block(struct thin_c *tc, struct bio *bio, dm_block_t block · 4 unmodified lines
10851085 */
10861086 if (bio_data_dir(bio) == READ) {
10871087 zero_fill_bio(bio);
1088− cell_defer_except(tc, cell);
1088+ cell_defer_no_holder(tc, cell);
10891089 bio_endio(bio, 0);
10901090 return;
10911091 }
@@ -1132,10 +1132,10 @@ static void process_bio(struct thin_c *tc, struct bio *bio) · 40 unmodified lines
11321132 case 0:
11331133 if (lookup_result.shared) {
11341134 process_shared_bio(tc, bio, block, &lookup_result);
1135− cell_defer_except(tc, cell);
1135+ cell_defer_no_holder(tc, cell);
11361136 } else {
11371137 inc_all_io_entry(tc->pool, bio);
1138− cell_defer_except(tc, cell);
1138+ cell_defer_no_holder(tc, cell);
11391139
11401140 remap_and_issue(tc, bio, lookup_result.block);
11411141 }
@@ -1144,7 +1144,7 @@ static void process_bio(struct thin_c *tc, struct bio *bio) · 2 unmodified lines
11441144 case -ENODATA:
11451145 if (bio_data_dir(bio) == READ && tc->origin_dev) {
11461146 inc_all_io_entry(tc->pool, bio);
1147− cell_defer_except(tc, cell);
1147+ cell_defer_no_holder(tc, cell);
11481148
11491149 remap_to_origin_and_issue(tc, bio);
11501150 } else
@@ -1153,7 +1153,7 @@ static void process_bio(struct thin_c *tc, struct bio *bio) · 2 unmodified lines
11531153
11541154 default:
11551155 DMERR("dm_thin_find_block() failed, error = %d", r);
1156− cell_defer_except(tc, cell);
1156+ cell_defer_no_holder(tc, cell);
11571157 bio_io_error(bio);
11581158 break;
11591159 }
@@ -1429,13 +1429,13 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio, · 269 unmodified lines
14291429
14301430 build_data_key(tc->td, result.block, &key);
14311431 if (dm_bio_detain(tc->pool->prison, &key, bio, &cell2)) {
1432− cell_defer_except(tc, cell1);
1432+ cell_defer_no_holder(tc, cell1);
14331433 return DM_MAPIO_SUBMITTED;
14341434 }
14351435
14361436 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);
14391439
14401440 remap(tc, bio, result.block);
14411441 return DM_MAPIO_REMAPPED;