From: <vl...@us...> - 2014-04-09 23:59:05
|
Revision: 5412 http://sourceforge.net/p/scst/svn/5412 Author: vlnb Date: 2014-04-09 23:59:02 +0000 (Wed, 09 Apr 2014) Log Message: ----------- vdisk_blockio: Reenable COMPARE AND WRITE The COMPARE AND WRITE implementation has been tested as follows against an SCST vdisk_blockio device: lba=7 bdev=$bdev for ((i=0;i<4;i++)); do dd if=/dev/urandom of=b$i bs=8k count=1; done for p in "0 1" "1 2" "2 3" "3 0"; do set $p; cat b$1 b$2 >b$1$2; done dd if=/dev/urandom of=$bdev dd if=b0 of=$bdev seek=$lba md5sum $bdev for ((i=0;i<10000;i++)); do for f in b01 b12 b23 b30; do sg_compare_and_write -l $lba -i $f -n 16 -x 16384 $bdev; done; done md5sum $bdev Signed-off-by: Bart Van Assche <bva...@ac...> Modified Paths: -------------- trunk/scst/src/dev_handlers/scst_vdisk.c Modified: trunk/scst/src/dev_handlers/scst_vdisk.c =================================================================== --- trunk/scst/src/dev_handlers/scst_vdisk.c 2014-04-09 23:58:20 UTC (rev 5411) +++ trunk/scst/src/dev_handlers/scst_vdisk.c 2014-04-09 23:59:02 UTC (rev 5412) @@ -1420,6 +1420,7 @@ [UNMAP] = vdisk_exec_unmap, \ [WRITE_SAME] = vdisk_exec_write_same, \ [WRITE_SAME_16] = vdisk_exec_write_same, \ + [COMPARE_AND_WRITE] = vdisk_exec_caw, \ [MAINTENANCE_IN] = vdisk_exec_maintenance_in, \ [SEND_DIAGNOSTIC] = vdisk_exec_send_diagnostic, \ [FORMAT_UNIT] = vdisk_exec_format_unit, @@ -1451,7 +1452,6 @@ [WRITE_10] = fileio_exec_write, [WRITE_12] = fileio_exec_write, [WRITE_16] = fileio_exec_write, - [COMPARE_AND_WRITE] = vdisk_exec_caw, [WRITE_VERIFY] = fileio_exec_write_verify, [WRITE_VERIFY_12] = fileio_exec_write_verify, [WRITE_VERIFY_16] = fileio_exec_write_verify, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |