diff options
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5ae0a05b481..0d471017588 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1183,12 +1183,12 @@ static struct dm_target_io *alloc_tio(struct clone_info *ci, | |||
1183 | } | 1183 | } |
1184 | 1184 | ||
1185 | static void __flush_target(struct clone_info *ci, struct dm_target *ti, | 1185 | static void __flush_target(struct clone_info *ci, struct dm_target *ti, |
1186 | unsigned flush_nr) | 1186 | unsigned request_nr) |
1187 | { | 1187 | { |
1188 | struct dm_target_io *tio = alloc_tio(ci, ti); | 1188 | struct dm_target_io *tio = alloc_tio(ci, ti); |
1189 | struct bio *clone; | 1189 | struct bio *clone; |
1190 | 1190 | ||
1191 | tio->info.flush_request = flush_nr; | 1191 | tio->info.target_request_nr = request_nr; |
1192 | 1192 | ||
1193 | clone = bio_alloc_bioset(GFP_NOIO, 0, ci->md->bs); | 1193 | clone = bio_alloc_bioset(GFP_NOIO, 0, ci->md->bs); |
1194 | __bio_clone(clone, ci->bio); | 1194 | __bio_clone(clone, ci->bio); |
@@ -1199,13 +1199,13 @@ static void __flush_target(struct clone_info *ci, struct dm_target *ti, | |||
1199 | 1199 | ||
1200 | static int __clone_and_map_empty_barrier(struct clone_info *ci) | 1200 | static int __clone_and_map_empty_barrier(struct clone_info *ci) |
1201 | { | 1201 | { |
1202 | unsigned target_nr = 0, flush_nr; | 1202 | unsigned target_nr = 0, request_nr; |
1203 | struct dm_target *ti; | 1203 | struct dm_target *ti; |
1204 | 1204 | ||
1205 | while ((ti = dm_table_get_target(ci->map, target_nr++))) | 1205 | while ((ti = dm_table_get_target(ci->map, target_nr++))) |
1206 | for (flush_nr = 0; flush_nr < ti->num_flush_requests; | 1206 | for (request_nr = 0; request_nr < ti->num_flush_requests; |
1207 | flush_nr++) | 1207 | request_nr++) |
1208 | __flush_target(ci, ti, flush_nr); | 1208 | __flush_target(ci, ti, request_nr); |
1209 | 1209 | ||
1210 | ci->sector_count = 0; | 1210 | ci->sector_count = 0; |
1211 | 1211 | ||
@@ -2424,11 +2424,11 @@ static void dm_queue_flush(struct mapped_device *md) | |||
2424 | queue_work(md->wq, &md->work); | 2424 | queue_work(md->wq, &md->work); |
2425 | } | 2425 | } |
2426 | 2426 | ||
2427 | static void dm_rq_set_flush_nr(struct request *clone, unsigned flush_nr) | 2427 | static void dm_rq_set_target_request_nr(struct request *clone, unsigned request_nr) |
2428 | { | 2428 | { |
2429 | struct dm_rq_target_io *tio = clone->end_io_data; | 2429 | struct dm_rq_target_io *tio = clone->end_io_data; |
2430 | 2430 | ||
2431 | tio->info.flush_request = flush_nr; | 2431 | tio->info.target_request_nr = request_nr; |
2432 | } | 2432 | } |
2433 | 2433 | ||
2434 | /* Issue barrier requests to targets and wait for their completion. */ | 2434 | /* Issue barrier requests to targets and wait for their completion. */ |
@@ -2446,7 +2446,7 @@ static int dm_rq_barrier(struct mapped_device *md) | |||
2446 | ti = dm_table_get_target(map, i); | 2446 | ti = dm_table_get_target(map, i); |
2447 | for (j = 0; j < ti->num_flush_requests; j++) { | 2447 | for (j = 0; j < ti->num_flush_requests; j++) { |
2448 | clone = clone_rq(md->flush_request, md, GFP_NOIO); | 2448 | clone = clone_rq(md->flush_request, md, GFP_NOIO); |
2449 | dm_rq_set_flush_nr(clone, j); | 2449 | dm_rq_set_target_request_nr(clone, j); |
2450 | atomic_inc(&md->pending[rq_data_dir(clone)]); | 2450 | atomic_inc(&md->pending[rq_data_dir(clone)]); |
2451 | map_request(ti, clone, md); | 2451 | map_request(ti, clone, md); |
2452 | } | 2452 | } |