diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2017-08-22 06:50:55 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-09-22 21:07:27 +0200 |
| commit | fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81 (patch) | |
| tree | 973ce75621cb47f79167bde4e48bdc357ed58bde /scsi/utils.c | |
| parent | b855f8d175a0a26c9798cbc5962bb8c0d9538231 (diff) | |
| download | focaccia-qemu-fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81.tar.gz focaccia-qemu-fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81.zip | |
scsi: add multipath support to qemu-pr-helper
Proper support of persistent reservation for multipath devices requires communication with the multipath daemon, so that the reservation is registered and applied when a path comes up. The device mapper utilities provide a library to do so; this patch makes qemu-pr-helper.c detect multipath devices and, when one is found, delegate the operation to libmpathpersist. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scsi/utils.c')
| -rw-r--r-- | scsi/utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scsi/utils.c b/scsi/utils.c index fab60bdf20..5684951b12 100644 --- a/scsi/utils.c +++ b/scsi/utils.c @@ -206,6 +206,11 @@ const struct SCSISense sense_code_OVERLAPPED_COMMANDS = { .key = ABORTED_COMMAND, .asc = 0x4e, .ascq = 0x00 }; +/* Command aborted, LUN Communication Failure */ +const struct SCSISense sense_code_LUN_COMM_FAILURE = { + .key = ABORTED_COMMAND, .asc = 0x08, .ascq = 0x00 +}; + /* Unit attention, Capacity data has changed */ const struct SCSISense sense_code_CAPACITY_CHANGED = { .key = UNIT_ATTENTION, .asc = 0x2a, .ascq = 0x09 @@ -216,6 +221,11 @@ const struct SCSISense sense_code_RESET = { .key = UNIT_ATTENTION, .asc = 0x29, .ascq = 0x00 }; +/* Unit attention, SCSI bus reset */ +const struct SCSISense sense_code_SCSI_BUS_RESET = { + .key = UNIT_ATTENTION, .asc = 0x29, .ascq = 0x02 +}; + /* Unit attention, No medium */ const struct SCSISense sense_code_UNIT_ATTENTION_NO_MEDIUM = { .key = UNIT_ATTENTION, .asc = 0x3a, .ascq = 0x00 |