NVMe: Translate NVMe status to errno
authorKeith Busch <keith.busch@intel.com>
Fri, 29 Aug 2014 15:06:12 +0000 (09:06 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 4 Nov 2014 20:17:09 +0000 (13:17 -0700)
commitb4ff9c8ddb6f0cec99a53ab26a5aa2ed0162c472
treef5852bde4a98c4acb718ec9ddab8f56e51343c94
parent695a4fe79ffa70023238b6b2d4c20fe1a05288fb
NVMe: Translate NVMe status to errno

This returns a more appropriate error for the "capacity exceeded"
status. In case other NVMe statuses have a better errno, this patch adds
a convience function to translate an NVMe status code to an errno for
IO commands, defaulting to the current -EIO.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c