[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-comment] [PATCH 5/5] virtio-scsi spec: add configuration change event
Paolo Bonzini <pbonzini@redhat.com> writes: > This adds an event for changes to LUN parameters, for example capacity. These > are reported in virtio-blk via configuration changes, and we want a similar > functionality in virtio-scsi too. And this one turns into the below. Thanks for sending these! Cheers, Rusty. commit a462b46fda65a4aea808e596ab90e9b044f04542 Author: Rusty Russell <rusty@au1.ibm.com> Date: Wed Aug 21 16:04:33 2013 +0930 2.5.6.6.3: add configuration change event From: Paolo Bonzini <pbonzini@redhat.com> This adds an event for changes to LUN parameters, for example capacity. These are reported in virtio-blk via configuration changes, and we want a similar functionality in virtio-scsi too. There is no list of supported parameter changes, instead we just refer to the list of sense codes in the SCSI specification. This event will usually be serviced in one of three ways: 1) call an OS service to revalidate the disk, either always or only for some specific sense codes; 2) somehow pass the sense directly to the upper-level driver; 3) inject a TEST UNIT READY command into the upper-level device, so that the OS will see the unit attention code and react. Of course a mix of the three is also possible, depending on how the driver writer prefers to have his layering violations served. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> See: https://lists.oasis-open.org/archives/virtio-comment/201308/msg00032.html Signed-off-by: Rusty Russell <rusty@au1.ibm.com> diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt index c4a341e..78930f5 100644 --- a/virtio-v1.0-wd01-part1-specification.txt +++ b/virtio-v1.0-wd01-part1-specification.txt @@ -2060,6 +2060,9 @@ targets that receive and process the requests. VIRTIO_SCSI_F_HOTPLUG (1) The host should enable hot-plug/hot-unplug of new LUNs and targets on the SCSI bus. + VIRTIO_SCSI_F_CHANGE (2) The host will report changes to LUN + parameters via a VIRTIO_SCSI_T_PARAM_CHANGE event. + 2.5.6.4 Device configuration layout ----------------------------------- @@ -2520,6 +2523,24 @@ contents of the event field. The following events are defined: When dropped events are reported, the driver should poll for asynchronous events manually using SCSI commands. + LUN parameter change + #define VIRTIO_SCSI_T_PARAM_CHANGE 3 + + By sending this event, the device signals that the configuration parameters + (for example the capacity) of a logical unit have changed. + The event field is set to VIRTIO_SCSI_T_PARAM_CHANGE. + The lun field addresses a logical unit in the SCSI host. + + The same event is also reported as a unit attention condition. + The reason field contains the additional sense code and additional sense code qualifier, + respectively in bits 0..7 and 8..15. + For example, a change in capacity will be reported as asc 0x2a, ascq 0x09 + (CAPACITY DATA HAS CHANGED). + + For MMC devices (inquiry type 5) there would be some overlap between this + event and the asynchronous notification event. + For simplicity, as of this version of the specification the host must + never report this event for MMC devices. 2.6 Reserved Feature Bits =========================
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]