dm.c (5b27b8ddbf37962fae8131cf595231b1be2c2b27) dm.c (0119ab14c31587198daed671a5bf949df2c14552)
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"

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

551
552 io->start_time = jiffies;
553
554 dm_stats_record_start(&md->stats, &io->stats_aux);
555
556 return io;
557}
558
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"

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

551
552 io->start_time = jiffies;
553
554 dm_stats_record_start(&md->stats, &io->stats_aux);
555
556 return io;
557}
558
559static void free_io(struct mapped_device *md, struct dm_io *io)
559static void free_io(struct dm_io *io)
560{
561 bio_put(&io->tio.clone);
562}
563
564static struct bio *alloc_tio(struct clone_info *ci, struct dm_target *ti,
565 unsigned target_bio_nr, unsigned *len, gfp_t gfp_mask)
566{
567 struct dm_target_io *tio;

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

834 */
835 io->status = BLK_STS_IOERR;
836 }
837 spin_unlock_irqrestore(&md->deferred_lock, flags);
838 }
839
840 io_error = io->status;
841 dm_end_io_acct(io);
560{
561 bio_put(&io->tio.clone);
562}
563
564static struct bio *alloc_tio(struct clone_info *ci, struct dm_target *ti,
565 unsigned target_bio_nr, unsigned *len, gfp_t gfp_mask)
566{
567 struct dm_target_io *tio;

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

834 */
835 io->status = BLK_STS_IOERR;
836 }
837 spin_unlock_irqrestore(&md->deferred_lock, flags);
838 }
839
840 io_error = io->status;
841 dm_end_io_acct(io);
842 free_io(md, io);
842 free_io(io);
843 smp_wmb();
844 this_cpu_dec(*md->pending_io);
845
846 /* nudge anyone waiting on suspend queue */
847 if (unlikely(wq_has_sleeper(&md->wait)))
848 wake_up(&md->wait);
849
850 if (io_error == BLK_STS_DM_REQUEUE)

--- 2099 unchanged lines hidden ---
843 smp_wmb();
844 this_cpu_dec(*md->pending_io);
845
846 /* nudge anyone waiting on suspend queue */
847 if (unlikely(wq_has_sleeper(&md->wait)))
848 wake_up(&md->wait);
849
850 if (io_error == BLK_STS_DM_REQUEUE)

--- 2099 unchanged lines hidden ---