nvme: TUR(Test unit Ready) broken for nvme drvices
PATCH 1/1 nvme: TUR(Test unit Ready) broken for nvme drvices
From: Wen Xiong <[email protected]>
When doing sg_turs over nvme devices, we got the following errors. The patch fixes the issue.
dd if=/dev/nvme0n1 of=/dev/null bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.000994747 s, 1.1 GB/s
sg_turs /dev/nvme0n1
device not ready
--- drivers/nvme/host/scsi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/nvme/host/scsi.c +1 -1
@@ -2208,7 +2208,7 @@ static int nvme_trans_test_unit_ready(struct nvme_ns *ns, struct sg_io_hdr *hdr, u8 *cmd) { -if (nvme_ctrl_ready (ns->ctrl)) +if (!nvme_ctrl_ready (ns->ctrl))return nvme_trans_completion (hdr,SAM_STAT_CHECK_CONDITION ,NOT_READY ,SCSI_ASC_LUN_NOT_READY ,SCSI_ASCQ_CAUSE_NOT_REPORTABLE );
Signature · 1 line
1.7.1
PATCH 1/1 nvme: TUR(Test unit Ready) broken for nvme drvices
Given how broken the emulation was we should simply remove it.
PATCH 1/1 nvme: TUR(Test unit Ready) broken for nvme drvices
Quoted 1 line · Christoph Hellwig
Given how broken the emulation was we should simply remove it.
Agreed!
Jens Axboe
maintainerPATCH 1/1 nvme: TUR(Test unit Ready) broken for nvme drvices
Quoted 4 lines · Keith Busch
Quoted 1 line · Christoph Hellwig
Given how broken the emulation was we should simply remove it.
Agreed!
I'm fine with killing it as well. On the FB infrastructure side, one of the first things I did wrt nvme was ensure that we don't rely on or use the scsi emulation at all.
And honestly, if even TUR is broken...
Signature · 1 line
Jens Axboe