nvmet: Introduced helper routine for controller status check.
authorParav Pandit <parav@mellanox.com>
Tue, 28 Feb 2017 05:21:33 +0000 (23:21 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:48:23 +0000 (09:48 -0600)
commit64a0ca88eaa66e3d219296b17aa08b78894e42c8
treeda9d6c8470ede1cc415e7117d29cd3a5a9baed1d
parent4151dd9a58c6b2758514fc88a1a3b02f9ab8b076
nvmet: Introduced helper routine for controller status check.

This patch introduces helper function for checking controller
status during admin and io command processing which returns u16
status. As to bring consistency on returning status, other
friend functions also now return u16 status instead of int
to match the spec.

As part of the theseerror log prints in also prints qid on
which command error occured.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/discovery.c
drivers/nvme/target/fabrics-cmd.c
drivers/nvme/target/io-cmd.c
drivers/nvme/target/nvmet.h