dm.c (e27363472f9bc96db831ceb2c31cf8b9a7c5b6f3) dm.c (332f2b1e7360dc118d95bc6f15bcb6830b73a8aa)
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

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

1364 while ((clone = bio_list_pop(&blist))) {
1365 clone_to_tio(clone)->is_duplicate_bio = true;
1366 __map_bio(clone);
1367 }
1368 break;
1369 }
1370}
1371
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

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

1364 while ((clone = bio_list_pop(&blist))) {
1365 clone_to_tio(clone)->is_duplicate_bio = true;
1366 __map_bio(clone);
1367 }
1368 break;
1369 }
1370}
1371
1372static int __send_empty_flush(struct clone_info *ci)
1372static void __send_empty_flush(struct clone_info *ci)
1373{
1374 unsigned target_nr = 0;
1375 struct dm_target *ti;
1376 struct bio flush_bio;
1377
1378 /*
1379 * Use an on-stack bio for this, it's safe since we don't
1380 * need to reference it after submit. It's just used as

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

1385
1386 ci->bio = &flush_bio;
1387 ci->sector_count = 0;
1388
1389 while ((ti = dm_table_get_target(ci->map, target_nr++)))
1390 __send_duplicate_bios(ci, ti, ti->num_flush_bios, NULL);
1391
1392 bio_uninit(ci->bio);
1373{
1374 unsigned target_nr = 0;
1375 struct dm_target *ti;
1376 struct bio flush_bio;
1377
1378 /*
1379 * Use an on-stack bio for this, it's safe since we don't
1380 * need to reference it after submit. It's just used as

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

1385
1386 ci->bio = &flush_bio;
1387 ci->sector_count = 0;
1388
1389 while ((ti = dm_table_get_target(ci->map, target_nr++)))
1390 __send_duplicate_bios(ci, ti, ti->num_flush_bios, NULL);
1391
1392 bio_uninit(ci->bio);
1393 return 0;
1394}
1395
1396static void __send_changing_extent_only(struct clone_info *ci, struct dm_target *ti,
1397 unsigned num_bios)
1398{
1399 unsigned len;
1400
1401 len = min_t(sector_t, ci->sector_count,

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

1561{
1562 struct clone_info ci;
1563 struct bio *orig_bio = NULL;
1564 int error = 0;
1565
1566 init_clone_info(&ci, md, map, bio);
1567
1568 if (bio->bi_opf & REQ_PREFLUSH) {
1393}
1394
1395static void __send_changing_extent_only(struct clone_info *ci, struct dm_target *ti,
1396 unsigned num_bios)
1397{
1398 unsigned len;
1399
1400 len = min_t(sector_t, ci->sector_count,

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

1560{
1561 struct clone_info ci;
1562 struct bio *orig_bio = NULL;
1563 int error = 0;
1564
1565 init_clone_info(&ci, md, map, bio);
1566
1567 if (bio->bi_opf & REQ_PREFLUSH) {
1569 error = __send_empty_flush(&ci);
1568 __send_empty_flush(&ci);
1570 /* dm_io_complete submits any data associated with flush */
1571 goto out;
1572 }
1573
1574 error = __split_and_process_bio(&ci);
1575 ci.io->map_task = NULL;
1576 if (error || !ci.sector_count)
1577 goto out;

--- 1596 unchanged lines hidden ---
1569 /* dm_io_complete submits any data associated with flush */
1570 goto out;
1571 }
1572
1573 error = __split_and_process_bio(&ci);
1574 ci.io->map_task = NULL;
1575 if (error || !ci.sector_count)
1576 goto out;

--- 1596 unchanged lines hidden ---