|
@@ -1113,8 +1113,8 @@ static void old_requeue_request(struct request *rq)
|
|
spin_unlock_irqrestore(q->queue_lock, flags);
|
|
spin_unlock_irqrestore(q->queue_lock, flags);
|
|
}
|
|
}
|
|
|
|
|
|
-static void dm_requeue_unmapped_original_request(struct mapped_device *md,
|
|
|
|
- struct request *rq)
|
|
|
|
|
|
+static void dm_requeue_original_request(struct mapped_device *md,
|
|
|
|
+ struct request *rq)
|
|
{
|
|
{
|
|
int rw = rq_data_dir(rq);
|
|
int rw = rq_data_dir(rq);
|
|
|
|
|
|
@@ -1130,13 +1130,6 @@ static void dm_requeue_unmapped_original_request(struct mapped_device *md,
|
|
rq_completed(md, rw, false);
|
|
rq_completed(md, rw, false);
|
|
}
|
|
}
|
|
|
|
|
|
-static void dm_requeue_unmapped_request(struct request *clone)
|
|
|
|
-{
|
|
|
|
- struct dm_rq_target_io *tio = clone->end_io_data;
|
|
|
|
-
|
|
|
|
- dm_requeue_unmapped_original_request(tio->md, tio->orig);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void old_stop_queue(struct request_queue *q)
|
|
static void old_stop_queue(struct request_queue *q)
|
|
{
|
|
{
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
@@ -1200,7 +1193,7 @@ static void dm_done(struct request *clone, int error, bool mapped)
|
|
return;
|
|
return;
|
|
else if (r == DM_ENDIO_REQUEUE)
|
|
else if (r == DM_ENDIO_REQUEUE)
|
|
/* The target wants to requeue the I/O */
|
|
/* The target wants to requeue the I/O */
|
|
- dm_requeue_unmapped_request(clone);
|
|
|
|
|
|
+ dm_requeue_original_request(tio->md, tio->orig);
|
|
else {
|
|
else {
|
|
DMWARN("unimplemented target endio return value: %d", r);
|
|
DMWARN("unimplemented target endio return value: %d", r);
|
|
BUG();
|
|
BUG();
|
|
@@ -1910,7 +1903,7 @@ static int map_request(struct dm_rq_target_io *tio, struct request *rq,
|
|
break;
|
|
break;
|
|
case DM_MAPIO_REQUEUE:
|
|
case DM_MAPIO_REQUEUE:
|
|
/* The target wants to requeue the I/O */
|
|
/* The target wants to requeue the I/O */
|
|
- dm_requeue_unmapped_request(clone);
|
|
|
|
|
|
+ dm_requeue_original_request(md, tio->orig);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
if (r > 0) {
|
|
if (r > 0) {
|
|
@@ -1933,7 +1926,7 @@ static void map_tio_request(struct kthread_work *work)
|
|
struct mapped_device *md = tio->md;
|
|
struct mapped_device *md = tio->md;
|
|
|
|
|
|
if (map_request(tio, rq, md) == DM_MAPIO_REQUEUE)
|
|
if (map_request(tio, rq, md) == DM_MAPIO_REQUEUE)
|
|
- dm_requeue_unmapped_original_request(md, rq);
|
|
|
|
|
|
+ dm_requeue_original_request(md, rq);
|
|
}
|
|
}
|
|
|
|
|
|
static void dm_start_request(struct mapped_device *md, struct request *orig)
|
|
static void dm_start_request(struct mapped_device *md, struct request *orig)
|