diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2012-12-21 15:23:39 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-12-21 15:23:39 -0500 |
commit | 89c7cd8974035f1fbfac5c01e668b2de0733b443 (patch) | |
tree | 124543b8fd1283c35fcf1f3ee456c62c73fff299 /drivers | |
parent | ddbd658f6446a35e4d6ba84812fd71023320cae2 (diff) |
dm raid1: rename read_record to bio_record
Rename struct read_record to bio_record in dm-raid1.
In the following patch, the structure will be used for both read and
write bios, so rename it.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-raid1.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index b4bc287bea7e..a7d0d8a4bbdf 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -138,7 +138,7 @@ static void dispatch_bios(void *context, struct bio_list *bio_list) | |||
138 | queue_bio(ms, bio, WRITE); | 138 | queue_bio(ms, bio, WRITE); |
139 | } | 139 | } |
140 | 140 | ||
141 | struct dm_raid1_read_record { | 141 | struct dm_raid1_bio_record { |
142 | struct mirror *m; | 142 | struct mirror *m; |
143 | struct dm_bio_details details; | 143 | struct dm_bio_details details; |
144 | }; | 144 | }; |
@@ -1072,7 +1072,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1072 | 1072 | ||
1073 | ti->num_flush_requests = 1; | 1073 | ti->num_flush_requests = 1; |
1074 | ti->num_discard_requests = 1; | 1074 | ti->num_discard_requests = 1; |
1075 | ti->per_bio_data_size = sizeof(struct dm_raid1_read_record); | 1075 | ti->per_bio_data_size = sizeof(struct dm_raid1_bio_record); |
1076 | ti->discard_zeroes_data_unsupported = true; | 1076 | ti->discard_zeroes_data_unsupported = true; |
1077 | 1077 | ||
1078 | ms->kmirrord_wq = alloc_workqueue("kmirrord", | 1078 | ms->kmirrord_wq = alloc_workqueue("kmirrord", |
@@ -1146,7 +1146,7 @@ static int mirror_map(struct dm_target *ti, struct bio *bio, | |||
1146 | int r, rw = bio_rw(bio); | 1146 | int r, rw = bio_rw(bio); |
1147 | struct mirror *m; | 1147 | struct mirror *m; |
1148 | struct mirror_set *ms = ti->private; | 1148 | struct mirror_set *ms = ti->private; |
1149 | struct dm_raid1_read_record *read_record; | 1149 | struct dm_raid1_bio_record *bio_record; |
1150 | struct dm_dirty_log *log = dm_rh_dirty_log(ms->rh); | 1150 | struct dm_dirty_log *log = dm_rh_dirty_log(ms->rh); |
1151 | 1151 | ||
1152 | if (rw == WRITE) { | 1152 | if (rw == WRITE) { |
@@ -1179,10 +1179,10 @@ static int mirror_map(struct dm_target *ti, struct bio *bio, | |||
1179 | if (unlikely(!m)) | 1179 | if (unlikely(!m)) |
1180 | return -EIO; | 1180 | return -EIO; |
1181 | 1181 | ||
1182 | read_record = dm_per_bio_data(bio, sizeof(struct dm_raid1_read_record)); | 1182 | bio_record = dm_per_bio_data(bio, sizeof(struct dm_raid1_bio_record)); |
1183 | dm_bio_record(&read_record->details, bio); | 1183 | dm_bio_record(&bio_record->details, bio); |
1184 | map_context->ptr = read_record; | 1184 | map_context->ptr = bio_record; |
1185 | read_record->m = m; | 1185 | bio_record->m = m; |
1186 | 1186 | ||
1187 | map_bio(m, bio); | 1187 | map_bio(m, bio); |
1188 | 1188 | ||
@@ -1196,7 +1196,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, | |||
1196 | struct mirror_set *ms = (struct mirror_set *) ti->private; | 1196 | struct mirror_set *ms = (struct mirror_set *) ti->private; |
1197 | struct mirror *m = NULL; | 1197 | struct mirror *m = NULL; |
1198 | struct dm_bio_details *bd = NULL; | 1198 | struct dm_bio_details *bd = NULL; |
1199 | struct dm_raid1_read_record *read_record = map_context->ptr; | 1199 | struct dm_raid1_bio_record *bio_record = map_context->ptr; |
1200 | 1200 | ||
1201 | /* | 1201 | /* |
1202 | * We need to dec pending if this was a write. | 1202 | * We need to dec pending if this was a write. |
@@ -1214,7 +1214,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, | |||
1214 | goto out; | 1214 | goto out; |
1215 | 1215 | ||
1216 | if (unlikely(error)) { | 1216 | if (unlikely(error)) { |
1217 | if (!read_record) { | 1217 | if (!bio_record) { |
1218 | /* | 1218 | /* |
1219 | * There wasn't enough memory to record necessary | 1219 | * There wasn't enough memory to record necessary |
1220 | * information for a retry or there was no other | 1220 | * information for a retry or there was no other |
@@ -1224,7 +1224,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, | |||
1224 | return -EIO; | 1224 | return -EIO; |
1225 | } | 1225 | } |
1226 | 1226 | ||
1227 | m = read_record->m; | 1227 | m = bio_record->m; |
1228 | 1228 | ||
1229 | DMERR("Mirror read failed from %s. Trying alternative device.", | 1229 | DMERR("Mirror read failed from %s. Trying alternative device.", |
1230 | m->dev->name); | 1230 | m->dev->name); |
@@ -1236,7 +1236,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, | |||
1236 | * mirror. | 1236 | * mirror. |
1237 | */ | 1237 | */ |
1238 | if (default_ok(m) || mirror_available(ms, bio)) { | 1238 | if (default_ok(m) || mirror_available(ms, bio)) { |
1239 | bd = &read_record->details; | 1239 | bd = &bio_record->details; |
1240 | 1240 | ||
1241 | dm_bio_restore(bd, bio); | 1241 | dm_bio_restore(bd, bio); |
1242 | map_context->ptr = NULL; | 1242 | map_context->ptr = NULL; |