dm-mpath.c (e3bde04f1ecef9d0508af9ea78421863744f552b) | dm-mpath.c (36fcffcc6500228efdfaf3a36761dd57a38366e3) |
---|---|
1/* 2 * Copyright (C) 2003 Sistina Software Limited. 3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. 4 * 5 * This file is released under the GPL. 6 */ 7 8#include <linux/device-mapper.h> --- 361 unchanged lines hidden (view full) --- 370{ 371 return (m->queue_if_no_path || 372 (m->queue_if_no_path != m->saved_queue_if_no_path && 373 dm_noflush_suspending(m->ti))); 374} 375 376#define pg_ready(m) (!(m)->queue_io && !(m)->pg_init_required) 377 | 1/* 2 * Copyright (C) 2003 Sistina Software Limited. 3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. 4 * 5 * This file is released under the GPL. 6 */ 7 8#include <linux/device-mapper.h> --- 361 unchanged lines hidden (view full) --- 370{ 371 return (m->queue_if_no_path || 372 (m->queue_if_no_path != m->saved_queue_if_no_path && 373 dm_noflush_suspending(m->ti))); 374} 375 376#define pg_ready(m) (!(m)->queue_io && !(m)->pg_init_required) 377 |
378static int map_io(struct multipath *m, struct request *clone, 379 union map_info *map_context) | 378/* 379 * Map cloned requests 380 */ 381static int multipath_map(struct dm_target *ti, struct request *clone, 382 union map_info *map_context) |
380{ | 383{ |
384 struct multipath *m = (struct multipath *) ti->private; |
|
381 int r = DM_MAPIO_REQUEUE; 382 size_t nr_bytes = blk_rq_bytes(clone); 383 unsigned long flags; 384 struct pgpath *pgpath; 385 struct block_device *bdev; 386 struct dm_mpath_io *mpio; 387 388 spin_lock_irqsave(&m->lock, flags); --- 515 unchanged lines hidden (view full) --- 904{ 905 struct multipath *m = ti->private; 906 907 flush_multipath_work(m); 908 free_multipath(m); 909} 910 911/* | 385 int r = DM_MAPIO_REQUEUE; 386 size_t nr_bytes = blk_rq_bytes(clone); 387 unsigned long flags; 388 struct pgpath *pgpath; 389 struct block_device *bdev; 390 struct dm_mpath_io *mpio; 391 392 spin_lock_irqsave(&m->lock, flags); --- 515 unchanged lines hidden (view full) --- 908{ 909 struct multipath *m = ti->private; 910 911 flush_multipath_work(m); 912 free_multipath(m); 913} 914 915/* |
912 * Map cloned requests 913 */ 914static int multipath_map(struct dm_target *ti, struct request *clone, 915 union map_info *map_context) 916{ 917 struct multipath *m = (struct multipath *) ti->private; 918 919 return map_io(m, clone, map_context); 920} 921 922/* | |
923 * Take a path out of use. 924 */ 925static int fail_path(struct pgpath *pgpath) 926{ 927 unsigned long flags; 928 struct multipath *m = pgpath->pg->m; 929 930 spin_lock_irqsave(&m->lock, flags); --- 824 unchanged lines hidden --- | 916 * Take a path out of use. 917 */ 918static int fail_path(struct pgpath *pgpath) 919{ 920 unsigned long flags; 921 struct multipath *m = pgpath->pg->m; 922 923 spin_lock_irqsave(&m->lock, flags); --- 824 unchanged lines hidden --- |