[Stgt-devel] vsd -> vdev is bad

Ming Zhang mingz at ele.uri.edu
Tue Sep 20 20:53:44 CEST 2005


On Tue, 2005-09-20 at 13:44 -0500, Mike Christie wrote:
> Ming Zhang wrote:
> > On Tue, 2005-09-20 at 13:27 -0500, Mike Christie wrote:
> > 
> >>Mike Christie wrote:
> >>
> >>>Ming Zhang wrote:
> >>>
> >>>
> >>>>Hi Mike
> >>>>
> >>>>I think change vsd->vdev is a bad idea.
> >>>
> >>>
> >>>I would agree it is a bad name, but all that device does today is the 
> >>>reads and writes. It should probably be called something-something-IO. 
> >>> From your experience with iet, do you think a read or write will be 
> >>>different for tape or disk when using the interface we are using?
> >>>
> >>
> >>Oh yeah, I had looked at scst's dev_handlers for an example. I think 
> >>mostly only the error hanlding will be a problem.
> > 
> > 
> > yes, that is quite different.
> > 
> 
> So I guess we will need something. Originally the vsd and sd names came 
> about becuase we were only doing SCSI and vsd was a virtual scsi disk 
> and sd was a scsi disk passthrough type of device. They basically 
> emulated SCSI's ULDs for tape, cd, disk but they also performed 
> different types of IO, passthrough vs generic_file_readv/writev. 
> Eventually we pushed the SCSI stuff to the protocol handlers and the 
> devices became what they are today. Maybe io_handlers or io_type is a 
> better name?
> 
> Then to suport scsi tape, cd, etc we can add that code to the scsi 
> protocol and have something simialr to the SCSI-ml ULDs.

iet currently have target type and io type. target_disk is a target type
and fileio is a io type. so current vsd looks more like a io_handlers as
u said.

in fact, i do not think target type is ok since it is quite possible
that 1 target has several lu while some of them are disk and others are
cdrom or tape. so LU type is better here. base on scsi spec, it is the
device server to decide what action it performs.

so it would be nice that tgt define a clear line between target mode
common and device specific; each lu has its own device server. device
server process most of the function in user space, and r/w use certain
io handler.

ming







More information about the stgt mailing list