List, Paolo Please find a patch that makes WRITE and WRITE_VERIFY fail with DATA_PROTECT/WRITE_PROTECTED sense code for devices that are write-protected via readonly=on
Tests have been berformed to verify the functionality using : ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 128 -drive file=20mb.img -drive file=./scsi-disk.img,if=scsi,readonly=on -net nic -net user,hostfwd=tcp:127.0.0.1:32601-:3260 -vnc 0.0.0.0:0 iscsi-test --dataloss --test="*300_readonly*" iscsi://127.0.0.1:32601/iqn.qemu.scsi-test/3 0300_readonly: ============== WRITE10 to LUN 0 ... [OK] WRITE12 to LUN 0 ... [OK] WRITE16 to LUN 0 ... [OK] WRITESAME10 to LUN 0 ... [OK] WRITESAME16 to LUN 0 ... [OK] WRITESAME10 to UNMAP LUN 0 ... LUN is not thin-provisioned. [SKIPPED] WRITESAME16 to UNMAP LUN 0 ... LUN is not thin-provisioned. [SKIPPED] UNMAP LUN 0 ... LUN is not thin-provisioned. [SKIPPED] TEST T0300_readonly [OK] regards ronnie sahlberg