[Stgt-devel] vsd -> vdev is bad

Mike Christie michaelc at cs.wisc.edu
Tue Sep 20 20:15:40 CEST 2005


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?

For any other non-read/write command it looks like we are going to 
userspace for now. Originally we had the possiblity to do passthrough 
using blk_execute_rq_nowait so we could do some interesting things in 
the kernel, but not anymore - hopefully temporarily. Patches are welcome 
though :) It was just a matter of having time to do things becuase we 
would need to account for the destination device's limits (segments, 
segment size, max_sectors, max cdb size for scsi, etc), and the target 
drivers limits. And the target driver's limits are a priority because we 
must support HW targets like qla2xxx.

The reason for the concern is that we are duplicating a lot of block 
layer code. The tgt_cmnd is starting to look like a request, the code to 
make and use scatterlists will eventually look like the block layers, 
and eventually for mainline I am guessing we will have to merge 
functionality so I am trying to stay small as possible so we can push 
common code. I am in the middle of cleaning up the SCSI ULDs to do this 
and it is a pain in the butt :)

Send me a patch and I will at least change the name if you are thinking 
a read for a tape will be different for a read for disk, or can think of 
a better name to convey that it is only a interface to do IO. I was 
thinking if tape or cd does become much different we will need something 
like the SCSI ULDs to abstract this to avoid some code duplication.

> 
> There can be many different types of virtual device.
> 
> so if a virtual disk device is vdev, then a virtual tape will be vtdev?
> i think name like these should be better.
> 
> vd virtual disk
> vt virtual tape
> vg - virtual generic
> vmmc - virtual mmc device
> 
> my 2c.
> 
> Ming
> 
> 
> --------------
> Log:
> rename vsd to vdev. NOTE YOU MUST CHANGE YOUR IETD.CONF TO REFLECT THIS.
> tgt_vsd IS NOW tgt_vdev
> 
> _______________________________________________
> Stgt-devel mailing list
> Stgt-devel at lists.berlios.de
> http://lists.berlios.de/mailman/listinfo/stgt-devel




More information about the stgt mailing list