Re: [PATCH] Add support for PREVENT/ALLOWMEDIUMREMOVAL and STARTSTOPUNIT

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

 



On Tue, Jan 31, 2012 at 9:26 AM, FUJITA Tomonori
<fujita.tomonori@xxxxxxxxxxxxx> wrote:
> On Mon, 30 Jan 2012 23:03:28 +1100
> ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
>
>> It hangs a "prevent" field off the itl nexus.
>> As long as at least one itl nexus have "prevent" set
>> we will not allow startstopunit to eject the media.
>
> The prevention of medium removal for the logical unit shall terminate
> after the I_T nexus loss?

It does.  Each initiator has its own it_lun nexus.
Each connected initiator has its own "prevent" field in the itl structure,
so when an initiator does PAMR it modifies/updates its own prevent
field associated with its itl

This structure is automatically destroyed/removed when the it nexus is
disconnected.


start stop unit then loops over all itl nexuses for the lun  and as
soon as at least one initiator has prevent removal set
ssu will fail to eject media.



>
> PREVENT ALLOW MEDIUM REMOVAL was removed in SPC4 so maybe we had
> better just let the current patch to be merged...

It is gone from SPC4    but still there (and updated) in SBC and MMC.
Different types of devices did have different incompatible meanings
for the 0x02   flag bit for this command
so in that sense it makes sense to remove it from SPC  (since they
were defined differently in SBC/MMC anyway)


For now I think the SBC3 definition is the valid one   and SPC was
probably the wrong place to define this opcode in the first place.



>
>
>> field of 01b or 11b (i.e., medium removal prevented). The prevention
>> of medium removal for the logical unit shall terminate after:
>>
>> a) One of the following occurs for each I_T nexus that previously had
>> medium removal prevented:
>>    A) Receipt of a PREVENT ALLOW MEDIUM REMOVAL command with a PREVENT
>>    field of 00b or 10b;
>>    B) An I_T nexus loss; or
>
--
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