From 75ede9ffb9e30adc4c810ecb2d2b15434a5f35e9 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 3 Jun 2009 19:01:58 +0000 Subject: [PATCH] - 64-bit cleanups - Other monor fixes and cleanups - Docs updates git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@892 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/README | 14 +++++++++----- scst/README_in-tree | 14 +++++++++----- scst/src/dev_handlers/scst_vdisk.c | 3 +++ scst/src/scst_lib.c | 6 +++--- scst/src/scst_targ.c | 13 ++++++------- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/scst/README b/scst/README index 42e925b89..8fc5ba960 100644 --- a/scst/README +++ b/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: diff --git a/scst/README_in-tree b/scst/README_in-tree index 0359e8893..dd0293b10 100644 --- a/scst/README_in-tree +++ b/scst/README_in-tree @@ -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: diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 3a363b2cb..0edd896c8 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -2715,6 +2715,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) @@ -2723,6 +2724,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(); diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 7790b1698..e492c820b 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -2087,7 +2087,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); @@ -3413,7 +3413,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); @@ -3731,7 +3731,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); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 82063975d..a68fff3ee 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2023,7 +2023,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; } @@ -2750,7 +2750,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); @@ -3304,7 +3304,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(); @@ -4471,9 +4471,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) @@ -4614,7 +4613,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;