OSDN Git Service

scsi-disk: flush cache after disabling it
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 31 Oct 2012 16:14:41 +0000 (17:14 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Nov 2012 14:00:27 +0000 (15:00 +0100)
commitaccfeb2dd32ece73350b06cee1b2403f47e86fe3
tree6c4ec5b30d7212df7ffea80053ac0f23b94e6e06
parent346a3017ec8d5ac4a6961d823f1e576867dc35ef
scsi-disk: flush cache after disabling it

SBC says that "if an application client changes the WCE bit from one to
zero via a MODE SELECT command, then the device server shall write
any data in volatile cache to non-volatile medium before completing
the command".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi-disk.c