[nvmewin] Handling IO when Format NVM op is in progress

Judy Brock-SSI judy.brock at ssi.samsung.com
Mon Jan 6 20:08:39 PST 2014


All,

Many months ago, I initiated a thread  (see attached) in which I argued that there were some holes in the current implementation of Format NVM ioctl passthru and in which I advocated for, among other things, the addition of logic to make sure pseudo-SCSI bus re-enumeration had fully taken place in the driver (such that Storport was notified that no "luns" were present) before the actual Format NVM op was launched.

I intuitively understand - and up to this point have unquestioningly agreed with - the basic assumption that the reason the namespaces must be  removed/ "luns" disappeared prior to formatting is because "we cannot format a namespace while the OS is aware of its presence and could be potentially sending I/O to a stale namespace config (i.e. changing LBA/sector size)." (excerpt from attached thread).

The question has recently arisen in internal discussion however as to whether or not we really have to do this. It was pointed out that SCSI devices (real ones) are capable of receiving IO commands while SCSI format commands are in process. They will return the following error:

      SCSI status =   Check condition, sense code = NOT READY (0x2), additional sense code = LUN NOT READY (0x4), additional sense code qualifier = FORMAT IN PROGRESS (0x4)

Why then, instead of removing namespaces/luns, can our Windows driver not return the same error status a real SCSI drive would return in such a situation? One would assume that upper layers of the storage stack have plenty years of experience in knowing what to do when it sees that error.

As a point of comparison, there is no standard I am aware of which specifies that Storport miniports which support real SCSI devices, if they happen to provide a proprietary pass-thru to allow a SCSI format command to go through to a device, must cause all LUNS to appear offline prior to formatting,

One could even argue (and they have!) that these IO commands could even be allowed to go through to the NVMe device itself (as in the real SCSI case); NVMe 1.1 Technical Proposal 005 has defined a new format-in-progress status code that NVMe firmware will be able to return at some point in the future, current firmware could easily return NAMESPACE_NOT_READY and driver could translate to the above SCSI sense data, etc.

So ...  here I stand, devil's advocate hat in hand, hoping to find out:


a)       what the "back story" is on how this decision was ultimately made (the attached thread said a lot of discussion took place on the subject)

b)       whether or not the diametrically-opposed alternative I am discussing above was thoroughly considered and if so, why it was rejected

c)        whether the topic bears reconsidering at this point.

Thanks in advance for your collective consideration,

Judy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20140107/aa5f2977/attachment.html>
-------------- next part --------------
An embedded message was scrubbed...
From: Judy Brock-SSI <judy.brock at ssi.samsung.com>
Subject: FW: [nvmewin] Handling pending commands when processing Format 
Date: Tue, 7 Jan 2014 03:04:30 +0000
Size: 176130
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20140107/aa5f2977/attachment.mht>


More information about the nvmewin mailing list