[Stgt-devel] supporting non-block devices

Pete Wyckoff pw
Sun Jan 21 17:50:12 CET 2007


fujita.tomonori at lab.ntt.co.jp wrote on Sat, 20 Jan 2007 23:04 +0900:
> I plan to split the current scsi command code; spc.c and sbc.c. The
> device type specific code (sbc.c, osd.c, etc) can use functions in
> spc.c.

Sounds good.  I've broken out scsi_cmd_perform to do just SPC
commands, first.  Then it looks at target type and calls into SBC or
OSD to perform specific command sets.  This makes things pretty
modular for us.

Problem is, we are using our OSD emulator to actually process the
commands, not a chunk of hardware.  If you had OSD hardware, you
would presumably use something like LU_BS_RAW and the sg_bdt.
Instead I have an osdemu_bdt with a cmd_submit function that makes
calls out to this emulator library.  I don't want to put that in
stgt, as it's a mess and quite beyond the scope of stgt.

I can send you a patch that recognizes OSD commands and calls
the bdt submit function, but I can't send a useful bdt that would
do anything with the commands.  (They don't translate easily into
read/write on a backing device, as you certainly know.)  Suggestions?

		-- Pete



More information about the stgt mailing list