[PATCH] LUN RESET clears all PREVENTALLOWs for that LUN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



List, Tomo,

Please find a patch that clears all PREVENTALLOWs that are registered for a LUN
when a RESET LUN is recived.
We should also do this for warm/cold target reset but those fyunctions are not implemented in tgtd yet.

This behaviour is described in SBC :
The
prevention of medium removal for the logical unit shall terminate after:
a) one of the following occurs for each I_T nexus through which medium removal had been prevented:
A) receipt of a PREVENT ALLOW MEDIUM REMOVAL command with the PREVENT field set to 00b;
or
B) an I_T nexus loss;
b) a power on;
c) a hard reset; or
d) a logical unit reset.


I have a test that validates that LUN RESET will clear the PREVENTALLOWs and TGTD passes this test with the patch :

iscsi-test --dataloss --test="*0385*" iscsi://127.0.0.1/iqn.ronnie.test/1
0385_preventallow_lun_reset:
============================
Try to set PREVENTALLOW ... [OK]
Try to eject the media ... Eject failed. [OK]
Send a LUN Reset to the target ... [OK]
Try to eject the media ... [OK]
Load the media again in case it was ejected ... [OK]
Clear the PREVENTALLOW again ... [OK]
TEST T0385_preventallow_lun_reset [OK]



regards
ronnie sahlberg


--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux