On 15-03-05 10:33 AM, Olaf Hering wrote:
I'm using scsi_debug to implement and test tools for xen-scsiback. Today I discovered that each LUN uses the very same storage, as described in the docs. What would it take to optionally use dedicated storage for each LUN? This is how I load scsi_debug: modprobe scsi_debug add_host=4 dev_size_mb=4 max_luns=4 num_parts=4 num_tgts=4 vpd_use_hostno=1
Olaf, Just having a quick look: the fake_storep, dif_storep and map_storep heaps would need to be per LU; IOWs placed in struct sdebug_dev_info. Also atomic_rw would need to be placed in that structure. To be backward compatible to what the scsi_debug driver does now (i.e. shares storage) accessor functions might be employed to hide whether the global or per LU instance is being handled. Handling the inevitable ENOMEM errors might be a bit tricky especially since extra LUs and hosts can be added dynamically via sysfs. So it is possible. The stock answer has typically been that you should probably be using the target subsystem for that. Thoughts? Doug Gilbert -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html