[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-comment] [PATCH 2/5] virtio-blk spec: writeback cache enable improvements
On Mon, 2013-08-19 at 11:55 +0200, Paolo Bonzini wrote: > This patch introduces two improvements to writeback cache handling > in the virtio-blk spec. > > 1) The VIRTIO_BLK_F_FLUSH feature is renamed to VIRTIO_BLK_F_WCE, and > QEMU's behavior is documented explicitly as part of the spec: the host > negotiates the feature only if its cache is writeback. The obvious dual > requirement is imposed on the guest: it should negotiate the feature > only if it is able to send flushes. And in order to protect against > data loss, the spec now mandates that the host operates in writethrough > mode if the guest does not negotiate VIRTIO_BLK_F_WCE (this behavior > was already _allowed_ by the spec so far). This can change with every > reset of course; typically the BIOS will run as writethrough, while the > "main" OS will run in writeback mode. This is a backwards-compatible > refinement geared towards old or limited guests, so there is no need > for a new feature bit. > > 2) a second feature is added, VIRTIO_BLK_F_CONFIG_WCE, that provides > the same information in the configuration. This will enable the driver > to modify the write-cache setting at runtime (via sysfs for Linux, via > MODE SELECT for Windows). I've got to say this looks cockeyed; you're effectively translating SCSI commands into your own command set: the way you're setting this up you have to modify the driver for every spec feature you support and have some sort of elaborate protocol to identify the supported feature set. What does this buy you? SCSI is already a packet transport protocol. Just transport the SCSI commands over the virtio-interface and let the server reply (with I don't know what you're talking about if the command isn't supported). This is the way SCSI probes real device, so if you do it this way there's no need for the elaborate protocol identification and SCSI will work out what the supported feature set is. James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]