dm-thin.c (59c3d2c6a12ff580b2c19c3925af4f4552639f8a) | dm-thin.c (7de3ee57da4b717050e79c9313a9bf66ccc72519) |
---|---|
1/* 2 * Copyright (C) 2011-2012 Red Hat UK. 3 * 4 * This file is released under the GPL. 5 */ 6 7#include "dm-thin-metadata.h" 8#include "dm-bio-prison.h" --- 1357 unchanged lines hidden (view full) --- 1366 h->shared_read_entry = NULL; 1367 h->all_io_entry = NULL; 1368 h->overwrite_mapping = NULL; 1369} 1370 1371/* 1372 * Non-blocking function called from the thin target's map function. 1373 */ | 1/* 2 * Copyright (C) 2011-2012 Red Hat UK. 3 * 4 * This file is released under the GPL. 5 */ 6 7#include "dm-thin-metadata.h" 8#include "dm-bio-prison.h" --- 1357 unchanged lines hidden (view full) --- 1366 h->shared_read_entry = NULL; 1367 h->all_io_entry = NULL; 1368 h->overwrite_mapping = NULL; 1369} 1370 1371/* 1372 * Non-blocking function called from the thin target's map function. 1373 */ |
1374static int thin_bio_map(struct dm_target *ti, struct bio *bio, 1375 union map_info *map_context) | 1374static int thin_bio_map(struct dm_target *ti, struct bio *bio) |
1376{ 1377 int r; 1378 struct thin_c *tc = ti->private; 1379 dm_block_t block = get_bio_block(tc, bio); 1380 struct dm_thin_device *td = tc->td; 1381 struct dm_thin_lookup_result result; 1382 struct dm_bio_prison_cell *cell1, *cell2; 1383 struct dm_cell_key key; --- 591 unchanged lines hidden (view full) --- 1975out_metadata: 1976 dm_put_device(ti, metadata_dev); 1977out_unlock: 1978 mutex_unlock(&dm_thin_pool_table.mutex); 1979 1980 return r; 1981} 1982 | 1375{ 1376 int r; 1377 struct thin_c *tc = ti->private; 1378 dm_block_t block = get_bio_block(tc, bio); 1379 struct dm_thin_device *td = tc->td; 1380 struct dm_thin_lookup_result result; 1381 struct dm_bio_prison_cell *cell1, *cell2; 1382 struct dm_cell_key key; --- 591 unchanged lines hidden (view full) --- 1974out_metadata: 1975 dm_put_device(ti, metadata_dev); 1976out_unlock: 1977 mutex_unlock(&dm_thin_pool_table.mutex); 1978 1979 return r; 1980} 1981 |
1983static int pool_map(struct dm_target *ti, struct bio *bio, 1984 union map_info *map_context) | 1982static int pool_map(struct dm_target *ti, struct bio *bio) |
1985{ 1986 int r; 1987 struct pool_c *pt = ti->private; 1988 struct pool *pool = pt->pool; 1989 unsigned long flags; 1990 1991 /* 1992 * As this is a singleton target, ti->begin is always zero. --- 628 unchanged lines hidden (view full) --- 2621bad_origin_dev: 2622 kfree(tc); 2623out_unlock: 2624 mutex_unlock(&dm_thin_pool_table.mutex); 2625 2626 return r; 2627} 2628 | 1983{ 1984 int r; 1985 struct pool_c *pt = ti->private; 1986 struct pool *pool = pt->pool; 1987 unsigned long flags; 1988 1989 /* 1990 * As this is a singleton target, ti->begin is always zero. --- 628 unchanged lines hidden (view full) --- 2619bad_origin_dev: 2620 kfree(tc); 2621out_unlock: 2622 mutex_unlock(&dm_thin_pool_table.mutex); 2623 2624 return r; 2625} 2626 |
2629static int thin_map(struct dm_target *ti, struct bio *bio, 2630 union map_info *map_context) | 2627static int thin_map(struct dm_target *ti, struct bio *bio) |
2631{ 2632 bio->bi_sector = dm_target_offset(ti, bio->bi_sector); 2633 | 2628{ 2629 bio->bi_sector = dm_target_offset(ti, bio->bi_sector); 2630 |
2634 return thin_bio_map(ti, bio, map_context); | 2631 return thin_bio_map(ti, bio); |
2635} 2636 | 2632} 2633 |
2637static int thin_endio(struct dm_target *ti, 2638 struct bio *bio, int err, 2639 union map_info *map_context) | 2634static int thin_endio(struct dm_target *ti, struct bio *bio, int err) |
2640{ 2641 unsigned long flags; 2642 struct dm_thin_endio_hook *h = dm_per_bio_data(bio, sizeof(struct dm_thin_endio_hook)); 2643 struct list_head work; 2644 struct dm_thin_new_mapping *m, *tmp; 2645 struct pool *pool = h->tc->pool; 2646 2647 if (h->shared_read_entry) { --- 176 unchanged lines hidden --- | 2635{ 2636 unsigned long flags; 2637 struct dm_thin_endio_hook *h = dm_per_bio_data(bio, sizeof(struct dm_thin_endio_hook)); 2638 struct list_head work; 2639 struct dm_thin_new_mapping *m, *tmp; 2640 struct pool *pool = h->tc->pool; 2641 2642 if (h->shared_read_entry) { --- 176 unchanged lines hidden --- |