[Stgt-devel] Prototype MMC DVD-ROM and burnable DVD+R implementation

ronnie sahlberg ronniesahlberg
Tue Apr 15 04:45:23 CEST 2008

On Tue, Apr 15, 2008 at 10:23 AM, FUJITA Tomonori
<fujita.tomonori at lab.ntt.co.jp> wrote:

>  Let me review the changes to the core first.
>  Once we agree on the changes to the core, please send them as separate
>  patches. Then you can post mmc patches as you like, a single patch or
>  multiple patches. I'm fine with either way.

Great, thanks.
Thinking about it, it might not be necessary to be able to create a
LUN which lacks a backing store, so that part of my proposed patch
it probably a mistake.

The semantics in core and tgtadm that i think would be useful for
devices such as MMC, and probably also SSC, that support
removable/ejectable media would be
1, ability to administratively make LUNs online/offline. Such offline
LUNs would still show up in report luns and be accessable, but the LUN
when in offline
    would behave as if there was no media loaded.
2, something similar to the two added lun methods :
lu_online/lu_offline which are called when the online/offline
attribute changes.
   So that the lun emulation cna perform additional, commandset
specific actions when the online attribute changes.
   For MMC, I think online/offline would map very nicely to "media is
inserted"/"no media loaded".
   For MMC I think it would make sense to let the LUN close the
backend file completely when the device goes offline and reopen it
   when the backend file goes online.   Thus
offline/replacefile/online would be similar to eject tray/replace
disk/close tray on a real physical device.

I think that for SSC it would also make sense to have the emulation
for this commandset also be informed/called on any/all changes on the
online attribute
in case SSC would want to map this and change its behaviour to map
"tape is inserted"/"no tape loaded".

Maybe there are better ways to implement this than lu_online/offline
methods for the lun. Though, for removable media it would be nice if
the offline/online cycle did close and reopen the backingstore file
incase one wants to "swap the media" while the device is offline.

ronnie s.

More information about the stgt mailing list