Tomo, Please find attached a patch that fixes three bugs in STARTSTOPUNIT 1, If power condition is != 0 then the LOEJ and START bits are to be ignored. I.e. we should not do any online/offline work. 2, Make sure LOEJ is set to 0 or 1, not as previously to 0 or 2 3, Only do the online/offline work IFF the removable attribute is set for this lun. I have also created some very basic tests to verify the functionality and for regression testing : iscsi-test --dataloss --test="*startstop*" iscsi://127.0.0.1/iqn.ronnie.test/1 0360_startstopunit_simple: =================== Media is removable. STARTSTOPUNIT should work Try to eject the media ... [OK] Try to mount the media again ... [OK] TEST T0360_startstopunit_simple [OK] 0361_startstopunit_pwrcnd: =================== Media is removable. STARTSTOPUNIT should work Try to eject media with PC != 0 ... [OK] Try to mount the media again ... [OK] TEST T0361_startstopunit_pwrcnd [OK] regards ronnie sahlberg -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-STARTSTOPUNIT-bugfixes.patch.gz Type: application/x-gzip Size: 860 bytes Desc: not available URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120716/a87bbe7e/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-STARTSTOPUNIT-bugfixes.patch Type: application/octet-stream Size: 1667 bytes Desc: not available URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120716/a87bbe7e/attachment.obj> |