dm.c (ddbd658f6446a35e4d6ba84812fd71023320cae2) | dm.c (7de3ee57da4b717050e79c9313a9bf66ccc72519) |
---|---|
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.h" --- 631 unchanged lines hidden (view full) --- 640 struct dm_io *io = tio->io; 641 struct mapped_device *md = tio->io->md; 642 dm_endio_fn endio = tio->ti->type->end_io; 643 644 if (!bio_flagged(bio, BIO_UPTODATE) && !error) 645 error = -EIO; 646 647 if (endio) { | 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.h" --- 631 unchanged lines hidden (view full) --- 640 struct dm_io *io = tio->io; 641 struct mapped_device *md = tio->io->md; 642 dm_endio_fn endio = tio->ti->type->end_io; 643 644 if (!bio_flagged(bio, BIO_UPTODATE) && !error) 645 error = -EIO; 646 647 if (endio) { |
648 r = endio(tio->ti, bio, error, &tio->info); | 648 r = endio(tio->ti, bio, error); |
649 if (r < 0 || r == DM_ENDIO_REQUEUE) 650 /* 651 * error and requeue request are handled 652 * in dec_pending(). 653 */ 654 error = r; 655 else if (r == DM_ENDIO_INCOMPLETE) 656 /* The target will handle the io */ --- 342 unchanged lines hidden (view full) --- 999 1000 /* 1001 * Map the clone. If r == 0 we don't need to do 1002 * anything, the target has assumed ownership of 1003 * this io. 1004 */ 1005 atomic_inc(&tio->io->io_count); 1006 sector = clone->bi_sector; | 649 if (r < 0 || r == DM_ENDIO_REQUEUE) 650 /* 651 * error and requeue request are handled 652 * in dec_pending(). 653 */ 654 error = r; 655 else if (r == DM_ENDIO_INCOMPLETE) 656 /* The target will handle the io */ --- 342 unchanged lines hidden (view full) --- 999 1000 /* 1001 * Map the clone. If r == 0 we don't need to do 1002 * anything, the target has assumed ownership of 1003 * this io. 1004 */ 1005 atomic_inc(&tio->io->io_count); 1006 sector = clone->bi_sector; |
1007 r = ti->type->map(ti, clone, &tio->info); | 1007 r = ti->type->map(ti, clone); |
1008 if (r == DM_MAPIO_REMAPPED) { 1009 /* the bio has been remapped so dispatch it */ 1010 1011 trace_block_bio_remap(bdev_get_queue(clone->bi_bdev), clone, 1012 tio->io->bio->bi_bdev->bd_dev, sector); 1013 1014 generic_make_request(clone); 1015 } else if (r < 0 || r == DM_MAPIO_REQUEUE) { --- 1818 unchanged lines hidden --- | 1008 if (r == DM_MAPIO_REMAPPED) { 1009 /* the bio has been remapped so dispatch it */ 1010 1011 trace_block_bio_remap(bdev_get_queue(clone->bi_bdev), clone, 1012 tio->io->bio->bi_bdev->bd_dev, sector); 1013 1014 generic_make_request(clone); 1015 } else if (r < 0 || r == DM_MAPIO_REQUEUE) { --- 1818 unchanged lines hidden --- |