dm-raid1.c (0045d61b5b7470f7228b35e1ab7139119e249503) dm-raid1.c (7de3ee57da4b717050e79c9313a9bf66ccc72519)
1/*
2 * Copyright (C) 2003 Sistina Software Limited.
3 * Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-bio-record.h"

--- 1128 unchanged lines hidden (view full) ---

1137 dm_kcopyd_client_destroy(ms->kcopyd_client);
1138 destroy_workqueue(ms->kmirrord_wq);
1139 free_context(ms, ti, ms->nr_mirrors);
1140}
1141
1142/*
1143 * Mirror mapping function
1144 */
1/*
2 * Copyright (C) 2003 Sistina Software Limited.
3 * Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-bio-record.h"

--- 1128 unchanged lines hidden (view full) ---

1137 dm_kcopyd_client_destroy(ms->kcopyd_client);
1138 destroy_workqueue(ms->kmirrord_wq);
1139 free_context(ms, ti, ms->nr_mirrors);
1140}
1141
1142/*
1143 * Mirror mapping function
1144 */
1145static int mirror_map(struct dm_target *ti, struct bio *bio,
1146 union map_info *map_context)
1145static int mirror_map(struct dm_target *ti, struct bio *bio)
1147{
1148 int r, rw = bio_rw(bio);
1149 struct mirror *m;
1150 struct mirror_set *ms = ti->private;
1151 struct dm_dirty_log *log = dm_rh_dirty_log(ms->rh);
1152 struct dm_raid1_bio_record *bio_record =
1153 dm_per_bio_data(bio, sizeof(struct dm_raid1_bio_record));
1154

--- 32 unchanged lines hidden (view full) ---

1187 dm_bio_record(&bio_record->details, bio);
1188 bio_record->m = m;
1189
1190 map_bio(m, bio);
1191
1192 return DM_MAPIO_REMAPPED;
1193}
1194
1146{
1147 int r, rw = bio_rw(bio);
1148 struct mirror *m;
1149 struct mirror_set *ms = ti->private;
1150 struct dm_dirty_log *log = dm_rh_dirty_log(ms->rh);
1151 struct dm_raid1_bio_record *bio_record =
1152 dm_per_bio_data(bio, sizeof(struct dm_raid1_bio_record));
1153

--- 32 unchanged lines hidden (view full) ---

1186 dm_bio_record(&bio_record->details, bio);
1187 bio_record->m = m;
1188
1189 map_bio(m, bio);
1190
1191 return DM_MAPIO_REMAPPED;
1192}
1193
1195static int mirror_end_io(struct dm_target *ti, struct bio *bio,
1196 int error, union map_info *map_context)
1194static int mirror_end_io(struct dm_target *ti, struct bio *bio, int error)
1197{
1198 int rw = bio_rw(bio);
1199 struct mirror_set *ms = (struct mirror_set *) ti->private;
1200 struct mirror *m = NULL;
1201 struct dm_bio_details *bd = NULL;
1202 struct dm_raid1_bio_record *bio_record =
1203 dm_per_bio_data(bio, sizeof(struct dm_raid1_bio_record));
1204

--- 244 unchanged lines hidden ---
1195{
1196 int rw = bio_rw(bio);
1197 struct mirror_set *ms = (struct mirror_set *) ti->private;
1198 struct mirror *m = NULL;
1199 struct dm_bio_details *bd = NULL;
1200 struct dm_raid1_bio_record *bio_record =
1201 dm_per_bio_data(bio, sizeof(struct dm_raid1_bio_record));
1202

--- 244 unchanged lines hidden ---