mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 12:11:26 +00:00
Merge of r891-892:
- 64-bit cleanups - Other monor fixes and cleanups - Docs updates git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/1.0.1.x@893 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
14
scst/README
14
scst/README
@@ -105,7 +105,9 @@ are:
|
||||
Then, to see your devices remotely, you need to add them to at least
|
||||
"Default" security group (see below how). By default, no local devices
|
||||
are seen remotely. There must be LUN 0 in each security group, i.e. LUs
|
||||
numeration must not start from, e.g., 1.
|
||||
numeration must not start from, e.g., 1. Otherwise you will see no
|
||||
devices on remote initiators and SCST core will write into the kernel
|
||||
log message: "tgt_dev for LUN 0 not found, command to unexisting LU?"
|
||||
|
||||
It is highly recommended to use scstadmin utility for configuring
|
||||
devices and security groups.
|
||||
@@ -503,7 +505,9 @@ IMPORTANT
|
||||
=========
|
||||
|
||||
There must be LUN 0 in each security group, i.e. LUs numeration must not
|
||||
start from, e.g., 1.
|
||||
start from, e.g., 1. Otherwise you will see no devices on remote
|
||||
initiators and SCST core will write into the kernel log message: "tgt_dev
|
||||
for LUN 0 not found, command to unexisting LU?"
|
||||
|
||||
IMPORTANT
|
||||
=========
|
||||
@@ -795,9 +799,9 @@ IMPORTANT: Some of the above compilation options in the SCST SVN enabled by defa
|
||||
========= i.e. development version of SCST is optimized currently rather for
|
||||
development and bug hunting, than for performance.
|
||||
|
||||
If you use SCST version taken directly from the SVN repository, you can
|
||||
set the above options, except CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ,
|
||||
in the needed values using debug2perf root Makefile target.
|
||||
You can set the above options, except
|
||||
CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ, in the needed values
|
||||
using debug2perf root Makefile target.
|
||||
|
||||
4. For other target and initiator software parts:
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ Installation
|
||||
To see your devices remotely, you need to add them to at least "Default"
|
||||
security group (see below how). By default, no local devices are seen
|
||||
remotely. There must be LUN 0 in each security group, i.e. LUs
|
||||
numeration must not start from, e.g., 1.
|
||||
numeration must not start from, e.g., 1. Otherwise you will see no
|
||||
devices on remote initiators and SCST core will write into the kernel
|
||||
log message: "tgt_dev for LUN 0 not found, command to unexisting LU?"
|
||||
|
||||
It is highly recommended to use scstadmin utility for configuring
|
||||
devices and security groups.
|
||||
@@ -435,7 +437,9 @@ IMPORTANT
|
||||
=========
|
||||
|
||||
There must be LUN 0 in each security group, i.e. LUs numeration must not
|
||||
start from, e.g., 1.
|
||||
start from, e.g., 1. Otherwise you will see no devices on remote
|
||||
initiators and SCST core will write into the kernel log message:
|
||||
"tgt_dev for LUN 0 not found, command to unexisting LU?"
|
||||
|
||||
IMPORTANT
|
||||
=========
|
||||
@@ -722,9 +726,9 @@ IMPORTANT: Some of the above compilation options in the SCST SVN enabled by defa
|
||||
========= i.e. development version of SCST is optimized currently rather for
|
||||
development and bug hunting, than for performance.
|
||||
|
||||
If you use SCST version taken directly from the SVN repository, you can
|
||||
set the above options, except CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ,
|
||||
in the needed values using debug2perf root Makefile target.
|
||||
You can set the above options, except
|
||||
CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ, in the needed values
|
||||
using debug2perf root Makefile target.
|
||||
|
||||
4. For other target and initiator software parts:
|
||||
|
||||
|
||||
@@ -2695,6 +2695,7 @@ static int vdisk_task_mgmt_fn(struct scst_mgmt_cmd *mcmd,
|
||||
struct scst_device *dev = tgt_dev->dev;
|
||||
struct scst_vdisk_dev *virt_dev =
|
||||
(struct scst_vdisk_dev *)dev->dh_priv;
|
||||
|
||||
dev->tst = DEF_TST;
|
||||
dev->d_sense = DEF_DSENSE;
|
||||
if (virt_dev->wt_flag && !virt_dev->nv_cache)
|
||||
@@ -2703,6 +2704,8 @@ static int vdisk_task_mgmt_fn(struct scst_mgmt_cmd *mcmd,
|
||||
dev->queue_alg = DEF_QUEUE_ALG;
|
||||
dev->swp = DEF_SWP;
|
||||
dev->tas = DEF_TAS;
|
||||
|
||||
virt_dev->prevent_allow_medium_removal = 0;
|
||||
}
|
||||
|
||||
TRACE_EXIT();
|
||||
|
||||
@@ -2084,7 +2084,7 @@ void scst_free_cmd(struct scst_cmd *cmd)
|
||||
#ifdef CONFIG_SCST_EXTRACHECKS
|
||||
if (unlikely(!cmd->sent_for_exec) && !cmd->internal) {
|
||||
PRINT_ERROR("Finishing not executed cmd %p (opcode "
|
||||
"%d, target %s, lun %lld, sn %ld, expected_sn %ld)",
|
||||
"%d, target %s, LUN %lld, sn %ld, expected_sn %ld)",
|
||||
cmd, cmd->cdb[0], cmd->tgtt->name,
|
||||
(long long unsigned int)cmd->lun,
|
||||
cmd->sn, cmd->tgt_dev->expected_sn);
|
||||
@@ -3339,7 +3339,7 @@ void scst_process_reset(struct scst_device *dev,
|
||||
list_for_each_entry(tgt_dev, &dev->dev_tgt_dev_list,
|
||||
dev_tgt_dev_list_entry) {
|
||||
TRACE(TRACE_MGMT_MINOR, "Clearing RESERVE'ation for "
|
||||
"tgt_dev lun %lld",
|
||||
"tgt_dev LUN %lld",
|
||||
(long long unsigned int)tgt_dev->lun);
|
||||
clear_bit(SCST_TGT_DEV_RESERVED,
|
||||
&tgt_dev->tgt_dev_flags);
|
||||
@@ -3652,7 +3652,7 @@ static void scst_free_all_UA(struct scst_tgt_dev *tgt_dev)
|
||||
|
||||
list_for_each_entry_safe(UA_entry, t,
|
||||
&tgt_dev->UA_list, UA_list_entry) {
|
||||
TRACE_MGMT_DBG("Clearing UA for tgt_dev lun %lld",
|
||||
TRACE_MGMT_DBG("Clearing UA for tgt_dev LUN %lld",
|
||||
(long long unsigned int)tgt_dev->lun);
|
||||
list_del(&UA_entry->UA_list_entry);
|
||||
mempool_free(UA_entry, scst_ua_mempool);
|
||||
|
||||
@@ -1923,7 +1923,7 @@ static int scst_do_real_exec(struct scst_cmd *cmd)
|
||||
|
||||
if (unlikely(dev->scsi_dev == NULL)) {
|
||||
PRINT_ERROR("Command for virtual device must be "
|
||||
"processed by device handler (lun %lld)!",
|
||||
"processed by device handler (LUN %lld)!",
|
||||
(long long unsigned int)cmd->lun);
|
||||
goto out_error;
|
||||
}
|
||||
@@ -2650,7 +2650,7 @@ static int scst_mode_select_checks(struct scst_cmd *cmd)
|
||||
}
|
||||
|
||||
TRACE(TRACE_SCSI, "Possible parameters changed UA %x "
|
||||
"(lun %lld): getting new parameters", cmd->sense[12],
|
||||
"(LUN %lld): getting new parameters", cmd->sense[12],
|
||||
(long long unsigned int)cmd->lun);
|
||||
|
||||
scst_obtain_device_parameters(cmd->dev);
|
||||
@@ -3194,7 +3194,7 @@ static int scst_translate_lun(struct scst_cmd *cmd)
|
||||
}
|
||||
if (res != 0) {
|
||||
TRACE(TRACE_MINOR,
|
||||
"tgt_dev for lun %lld not found, command to "
|
||||
"tgt_dev for LUN %lld not found, command to "
|
||||
"unexisting LU?",
|
||||
(long long unsigned int)cmd->lun);
|
||||
__scst_put();
|
||||
@@ -4361,9 +4361,8 @@ static int scst_mgmt_cmd_init(struct scst_mgmt_cmd *mcmd)
|
||||
case SCST_LUN_RESET:
|
||||
rc = scst_mgmt_translate_lun(mcmd);
|
||||
if (rc < 0) {
|
||||
PRINT_ERROR("Corresponding device for lun %lld not "
|
||||
"found",
|
||||
(long long unsigned int)mcmd->lun);
|
||||
PRINT_ERROR("Corresponding device for LUN %lld not "
|
||||
"found", (long long unsigned int)mcmd->lun);
|
||||
mcmd->status = SCST_MGMT_STATUS_LUN_NOT_EXIST;
|
||||
mcmd->state = SCST_MCMD_STATE_DONE;
|
||||
} else if (rc != 0)
|
||||
@@ -4504,7 +4503,7 @@ static int scst_lun_reset(struct scst_mgmt_cmd *mcmd)
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
TRACE(TRACE_MGMT, "Resetting lun %lld (mcmd %p)",
|
||||
TRACE(TRACE_MGMT, "Resetting LUN %lld (mcmd %p)",
|
||||
(long long unsigned int)tgt_dev->lun, mcmd);
|
||||
|
||||
mcmd->needs_unblocking = 1;
|
||||
|
||||
@@ -955,11 +955,11 @@ static void exec_inquiry(struct vdisk_cmd *vcmd)
|
||||
char dev_id_str[17];
|
||||
|
||||
dev_id_num = gen_dev_id_num(dev);
|
||||
dev_id_len = snprintf(dev_id_str, sizeof(dev_id_str), "%llx",
|
||||
dev_id_len = snprintf(dev_id_str, sizeof(dev_id_str), "%"PRIx64,
|
||||
dev_id_num);
|
||||
if (dev_id_len >= (signed)sizeof(dev_id_str))
|
||||
dev_id_len = sizeof(dev_id_str) - 1;
|
||||
TRACE_DBG("dev_id num %llx, str %s, len %d", dev_id_num,
|
||||
TRACE_DBG("dev_id num %"PRIx64", str %s, len %d", dev_id_num,
|
||||
dev_id_str, dev_id_len);
|
||||
if (0 == cmd->cdb[2]) { /* supported vital product data pages */
|
||||
buf[3] = 3;
|
||||
|
||||
@@ -433,7 +433,7 @@ int main(int argc, char **argv)
|
||||
PRINT_INFO("trace_flag %lx", trace_flag);
|
||||
#endif
|
||||
|
||||
snprintf(dev.usn, sizeof(dev.usn), "%llx", gen_dev_id_num(&dev));
|
||||
snprintf(dev.usn, sizeof(dev.usn), "%"PRIx64, gen_dev_id_num(&dev));
|
||||
TRACE_DBG("usn %s", dev.usn);
|
||||
|
||||
dev.scst_usr_fd = open(DEV_USER_PATH DEV_USER_NAME, O_RDWR |
|
||||
|
||||
Reference in New Issue
Block a user