dm: introduce a new DM_MAPIO_KILL return value

This untangles the DM_MAPIO_* values returned from ->clone_and_map_rq
from the error codes used by the block layer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
Christoph Hellwig
2017-04-26 09:40:39 +02:00
committed by Mike Snitzer
父節點 7ed8578a96
當前提交 412445acb6
共有 3 個文件被更改,包括 7 次插入8 次删除

查看文件

@@ -504,14 +504,12 @@ static int map_request(struct dm_rq_target_io *tio)
/* The target wants to requeue the I/O after a delay */
dm_requeue_original_request(tio, true);
break;
default:
if (r > 0) {
DMWARN("unimplemented target map return value: %d", r);
BUG();
}
case DM_MAPIO_KILL:
/* The target wants to complete the I/O */
dm_kill_unmapped_request(rq, r);
dm_kill_unmapped_request(rq, -EIO);
default:
DMWARN("unimplemented target map return value: %d", r);
BUG();
}
return r;