mirror of
https://github.com/SCST-project/scst.git
synced 2026-07-20 23:12:20 +00:00
Patch from Vu Pham <huongvp@yahoo.com>:
We currently have multiple scst targets with exported fileio or blockio luns using the same files or block devices. These fileio or blockio luns end up to have the same lun ID (dev_id_num), linux dm-multipath recognizes them as same lun (because of lun ID) with different paths which is wrong. It should be multiple separated luns from different scst targets. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@228 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -321,6 +321,12 @@ static char *vcdrom_proc_help_string =
|
||||
"echo \"open|change|close NAME [FILE_NAME]\" "
|
||||
">/proc/scsi_tgt/" VCDROM_NAME "/" VCDROM_NAME "\n";
|
||||
|
||||
static int scst_vdisk_ID;
|
||||
|
||||
module_param_named(scst_vdisk_ID, scst_vdisk_ID, int, 0);
|
||||
MODULE_PARM_DESC(scst_vdisk_ID, "SCST virtual disk subsystem ID");
|
||||
|
||||
|
||||
/**************************************************************
|
||||
* Function: vdisk_open
|
||||
*
|
||||
@@ -1101,6 +1107,9 @@ static void vdisk_exec_inquiry(struct scst_cmd *cmd)
|
||||
*/
|
||||
dev_id_num ^= ((rv << i) | (rv >> (32 - i)));
|
||||
}
|
||||
|
||||
dev_id_num += scst_vdisk_ID;
|
||||
|
||||
len = scnprintf(dev_id_str, 6, "%d", dev_id_num);
|
||||
TRACE_DBG("num %d, str <%s>, len %d",
|
||||
dev_id_num, dev_id_str, len);
|
||||
|
||||
Reference in New Issue
Block a user