mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 19:51:27 +00:00
Fixed more spelling errors in source code comments and logging statements.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2708 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -735,7 +735,7 @@ struct scst_tgt_template {
|
||||
* double buffer allocation and memory leaks alloc_data_buf() shall
|
||||
* fail.
|
||||
*
|
||||
* Shall return 0 in case of success or < 0 (preferrably -ENOMEM)
|
||||
* Shall return 0 in case of success or < 0 (preferably -ENOMEM)
|
||||
* in case of error, or > 0 if the regular SCST allocation should be
|
||||
* done. In case of returning successfully,
|
||||
* scst_cmd->tgt_data_buf_alloced will be set by SCST.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2004 - 2005 Leonid Stoljar
|
||||
* Copyright (C) 2007 - 2010 ID7 Ltd.
|
||||
*
|
||||
* Contains macroses for execution tracing and error reporting
|
||||
* Contains macros for execution tracing and error reporting
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -122,7 +122,7 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We don't print prefix for debug traces to not put additional preasure
|
||||
* We don't print prefix for debug traces to not put additional pressure
|
||||
* on the logging system in case of a lot of logging.
|
||||
*/
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ EXPORT_SYMBOL(debug_print_buffer);
|
||||
* if the name corrupted in the debug logs because of the race for this buffer.
|
||||
*
|
||||
* Note! You can't call this function 2 or more times in a single logging
|
||||
* (printk) statement, because then each new call of this functon will override
|
||||
* (printk) statement, because then each new call of this function will override
|
||||
* data written in this buffer by the previous call. You should instead split
|
||||
* that logging statement on smaller statements each calling
|
||||
* debug_transport_id_to_initiator_name() only once.
|
||||
|
||||
@@ -115,7 +115,7 @@ struct scst_sdbops {
|
||||
* type_disk devkey[0]
|
||||
* type_tape devkey[1]
|
||||
* type_printer devkey[2]
|
||||
* type_proseccor devkey[3]
|
||||
* type_processor devkey[3]
|
||||
* type_worm devkey[4]
|
||||
* type_cdrom devkey[5]
|
||||
* type_scanner devkey[6]
|
||||
@@ -705,7 +705,7 @@ static inline void tm_dbg_deinit_tgt_dev(struct scst_tgt_dev *tgt_dev) {}
|
||||
* scst_alloc_sense() - allocate sense buffer for command
|
||||
*
|
||||
* Allocates, if necessary, sense buffer for command. Returns 0 on success
|
||||
* and error code othrwise. Parameter "atomic" should be non-0 if the
|
||||
* and error code otherwise. Parameter "atomic" should be non-0 if the
|
||||
* function called in atomic context.
|
||||
*/
|
||||
int scst_alloc_sense(struct scst_cmd *cmd, int atomic)
|
||||
@@ -743,7 +743,7 @@ EXPORT_SYMBOL(scst_alloc_sense);
|
||||
*
|
||||
* Allocates, if necessary, sense buffer for command and copies in
|
||||
* it data from the supplied sense buffer. Returns 0 on success
|
||||
* and error code othrwise.
|
||||
* and error code otherwise.
|
||||
*/
|
||||
int scst_alloc_set_sense(struct scst_cmd *cmd, int atomic,
|
||||
const uint8_t *sense, unsigned int len)
|
||||
@@ -1211,7 +1211,7 @@ void scst_check_convert_sense(struct scst_cmd *cmd)
|
||||
cmd);
|
||||
if ((cmd->sense_buflen < 18) || (cmd->sense_valid_len < 8)) {
|
||||
PRINT_ERROR("Sense too small to convert (%d, "
|
||||
"type: descryptor, valid %d)",
|
||||
"type: descriptor, valid %d)",
|
||||
cmd->sense_buflen, cmd->sense_valid_len);
|
||||
goto out;
|
||||
}
|
||||
@@ -1406,7 +1406,7 @@ void scst_gen_aen_or_ua(struct scst_tgt_dev *tgt_dev,
|
||||
}
|
||||
|
||||
queue_ua:
|
||||
TRACE_MGMT_DBG("AEN not supported, queuing plain UA (tgt_dev %p)",
|
||||
TRACE_MGMT_DBG("AEN not supported, queueing plain UA (tgt_dev %p)",
|
||||
tgt_dev);
|
||||
sl = scst_set_sense(sense_buffer, sizeof(sense_buffer),
|
||||
tgt_dev->dev->d_sense, key, asc, ascq);
|
||||
@@ -1483,7 +1483,7 @@ static void scst_queue_report_luns_changed_UA(struct scst_session *sess,
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
TRACE_MGMT_DBG("Queuing REPORTED LUNS DATA CHANGED UA "
|
||||
TRACE_MGMT_DBG("Queueing REPORTED LUNS DATA CHANGED UA "
|
||||
"(sess %p)", sess);
|
||||
|
||||
local_bh_disable();
|
||||
@@ -2145,7 +2145,7 @@ void scst_adjust_resp_data_len(struct scst_cmd *cmd)
|
||||
cmd->expected_transfer_len);
|
||||
|
||||
if (cmd->adjusted_resp_data_len != cmd->resp_data_len) {
|
||||
TRACE_MEM("Abjusting resp_data_len to %d (cmd %p, sg %p, "
|
||||
TRACE_MEM("Adjusting resp_data_len to %d (cmd %p, sg %p, "
|
||||
"sg_cnt %d)", cmd->adjusted_resp_data_len, cmd, cmd->sg,
|
||||
cmd->sg_cnt);
|
||||
scst_check_restore_sg_buff(cmd);
|
||||
@@ -2256,7 +2256,7 @@ int scst_queue_retry_cmd(struct scst_cmd *cmd, int finished_cmds)
|
||||
/*
|
||||
* Memory barrier is needed here, because we need the exact order
|
||||
* between the read and write between retry_cmds and finished_cmds to
|
||||
* not miss the case when a command finished while we queuing it for
|
||||
* not miss the case when a command finished while we queueing it for
|
||||
* retry after the finished_cmds check.
|
||||
*/
|
||||
smp_mb();
|
||||
@@ -2315,7 +2315,7 @@ void scst_update_hw_pending_start(struct scst_cmd *cmd)
|
||||
EXPORT_SYMBOL_GPL(scst_update_hw_pending_start);
|
||||
|
||||
/*
|
||||
* Supposed to be called under sess_list_lock, but can release/reaquire it.
|
||||
* Supposed to be called under sess_list_lock, but can release/reacquire it.
|
||||
* Returns 0 to continue, >0 to restart, <0 to break.
|
||||
*/
|
||||
static int scst_check_hw_pending_cmd(struct scst_cmd *cmd,
|
||||
@@ -4848,7 +4848,7 @@ EXPORT_SYMBOL_GPL(scst_copy_sg);
|
||||
* @buf: pointer on the resulting pointer
|
||||
*
|
||||
* If the command's buffer >single page, it vmalloc() the needed area
|
||||
* and copies the buffer there. Returnes length of the buffer or negative
|
||||
* and copies the buffer there. Returns length of the buffer or negative
|
||||
* error code otherwise.
|
||||
*/
|
||||
int scst_get_full_buf(struct scst_cmd *cmd, uint8_t **buf)
|
||||
@@ -6018,7 +6018,7 @@ void scst_process_reset(struct scst_device *dev,
|
||||
dev->dev_reserved = 0;
|
||||
/*
|
||||
* There is no need to send RELEASE, since the device is going
|
||||
* to be resetted. Actually, since we can be in RESET TM
|
||||
* to be reset. Actually, since we can be in RESET TM
|
||||
* function, it might be dangerous.
|
||||
*/
|
||||
}
|
||||
@@ -6235,7 +6235,7 @@ static void scst_alloc_set_UA(struct scst_tgt_dev *tgt_dev,
|
||||
|
||||
UA_entry->global_UA = (flags & SCST_SET_UA_FLAG_GLOBAL) != 0;
|
||||
if (UA_entry->global_UA)
|
||||
TRACE_MGMT_DBG("Queuing global UA %p", UA_entry);
|
||||
TRACE_MGMT_DBG("Queueing global UA %p", UA_entry);
|
||||
|
||||
if (sense_len > (int)sizeof(UA_entry->UA_sense_buffer)) {
|
||||
PRINT_WARNING("Sense truncated (needed %d), shall you increase "
|
||||
|
||||
@@ -193,7 +193,7 @@ static void __scst_resume_activity(void);
|
||||
* error code otherwise.
|
||||
*
|
||||
* Target drivers supposed to behave sanely and not call register()
|
||||
* and unregister() randomly sinultaneously.
|
||||
* and unregister() randomly simultaneously.
|
||||
*/
|
||||
int __scst_register_target_template(struct scst_tgt_template *vtt,
|
||||
const char *version)
|
||||
@@ -387,7 +387,7 @@ EXPORT_SYMBOL(__scst_register_target_template_non_gpl);
|
||||
* scst_unregister_target_template() - unregister target template
|
||||
*
|
||||
* Target drivers supposed to behave sanely and not call register()
|
||||
* and unregister() randomly sinultaneously. Also it is supposed that
|
||||
* and unregister() randomly simultaneously. Also it is supposed that
|
||||
* no attempts to create new targets for this vtt will be done in a race
|
||||
* with this function.
|
||||
*/
|
||||
@@ -1046,7 +1046,7 @@ static int scst_check_device_name(const char *dev_name)
|
||||
* @dev_name: the new device name, NULL-terminated string. Must be uniq
|
||||
* among all virtual devices in the system.
|
||||
*
|
||||
* Registers a virtual device and returns assinged to the device ID on
|
||||
* Registers a virtual device and returns ID assigned to the device on
|
||||
* success, or negative value otherwise
|
||||
*/
|
||||
int scst_register_virtual_device(struct scst_dev_type *dev_handler,
|
||||
@@ -1977,7 +1977,7 @@ EXPORT_SYMBOL(scst_get);
|
||||
/**
|
||||
* scst_put() - decrease global SCST ref counter
|
||||
*
|
||||
* Decreses global SCST ref counter that prevents from entering into suspended
|
||||
* Decreases global SCST ref counter that prevents from entering into suspended
|
||||
* activities stage, so protects from any global management operations. On
|
||||
* zero, if suspending activities is waiting, they will be suspended.
|
||||
*/
|
||||
|
||||
@@ -399,7 +399,7 @@ static void sgv_purge_work_fn(struct delayed_work *work)
|
||||
/*
|
||||
* Let's reschedule it for full period to not get here
|
||||
* too often. In the worst case we have shrinker
|
||||
* to reclaim buffers quickier.
|
||||
* to reclaim buffers more quickly.
|
||||
*/
|
||||
TRACE_MEM("Rescheduling purge work for pool %p (delay "
|
||||
"%d HZ/%d sec)", pool, pool->purge_interval,
|
||||
@@ -1503,7 +1503,7 @@ static void sgv_evaluate_local_max_pages(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* sgv_pool_flush - flushe the SGV pool
|
||||
* sgv_pool_flush() - flushes the SGV pool.
|
||||
*
|
||||
* Flushes, i.e. frees, all the cached entries in the SGV pool.
|
||||
*/
|
||||
@@ -1959,7 +1959,7 @@ ssize_t sgv_sysfs_stat_reset(struct kobject *kobj,
|
||||
atomic_set(&pool->other_merged, 0);
|
||||
atomic_set(&pool->other_alloc, 0);
|
||||
|
||||
PRINT_INFO("Statistics for SGV pool %s resetted", pool->name);
|
||||
PRINT_INFO("Statistics for SGV pool %s reset", pool->name);
|
||||
|
||||
TRACE_EXIT_RES(count);
|
||||
return count;
|
||||
@@ -2003,7 +2003,7 @@ ssize_t sgv_sysfs_global_stat_reset(struct kobject *kobj,
|
||||
atomic_set(&sgv_releases_on_hiwmk_failed, 0);
|
||||
atomic_set(&sgv_other_total_alloc, 0);
|
||||
|
||||
PRINT_INFO("%s", "Global SGV pool statistics resetted");
|
||||
PRINT_INFO("%s", "Global SGV pool statistics reset");
|
||||
|
||||
TRACE_EXIT_RES(count);
|
||||
return count;
|
||||
|
||||
@@ -491,7 +491,7 @@ static void scst_pr_send_ua_reg(struct scst_device *dev,
|
||||
|
||||
scst_set_sense(ua, sizeof(ua), dev->d_sense, key, asc, ascq);
|
||||
|
||||
TRACE_PR("Queuing UA [%x %x %x]: registrant %s/%d (%p), tgt_dev %p, "
|
||||
TRACE_PR("Queueing UA [%x %x %x]: registrant %s/%d (%p), tgt_dev %p, "
|
||||
"key %016llx", ua[2], ua[12], ua[13],
|
||||
debug_transport_id_to_initiator_name(reg->transport_id),
|
||||
reg->rel_tgt_id, reg, reg->tgt_dev, reg->key);
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
|
||||
#define TRACE_RTRY 0x80000000
|
||||
#define TRACE_SCSI_SERIALIZING 0x40000000
|
||||
/** top being the edge away from the interupt */
|
||||
/** top being the edge away from the interrupt */
|
||||
#define TRACE_SND_TOP 0x20000000
|
||||
#define TRACE_RCV_TOP 0x01000000
|
||||
/** bottom being the edge toward the interupt */
|
||||
/** bottom being the edge toward the interrupt */
|
||||
#define TRACE_SND_BOT 0x08000000
|
||||
#define TRACE_RCV_BOT 0x04000000
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ out_redirect:
|
||||
* Description:
|
||||
* Notifies SCST that the driver finished its part of the command
|
||||
* initialization, and the command is ready for execution.
|
||||
* The second argument sets preferred command execition context.
|
||||
* The second argument sets preferred command execution context.
|
||||
* See SCST_CONTEXT_* constants for details.
|
||||
*
|
||||
* !!IMPORTANT!!
|
||||
@@ -272,7 +272,7 @@ void scst_cmd_init_done(struct scst_cmd *cmd,
|
||||
"(cmd %p)", (long long unsigned int)cmd->tag,
|
||||
(long long unsigned int)cmd->lun, cmd->cdb_len,
|
||||
cmd->queue_type, cmd);
|
||||
PRINT_BUFF_FLAG(TRACE_SCSI|TRACE_RCV_BOT, "Recieving CDB",
|
||||
PRINT_BUFF_FLAG(TRACE_SCSI|TRACE_RCV_BOT, "Receiving CDB",
|
||||
cmd->cdb, cmd->cdb_len);
|
||||
|
||||
#ifdef CONFIG_SCST_EXTRACHECKS
|
||||
@@ -1019,7 +1019,7 @@ static int scst_preprocessing_done(struct scst_cmd *cmd)
|
||||
* scst_restart_cmd() - restart execution of the command
|
||||
* @cmd: SCST commands
|
||||
* @status: completion status
|
||||
* @pref_context: preferred command execition context
|
||||
* @pref_context: preferred command execution context
|
||||
*
|
||||
* Description:
|
||||
* Notifies SCST that the driver finished its part of the command's
|
||||
@@ -1768,7 +1768,7 @@ static int scst_request_sense_local(struct scst_cmd *cmd)
|
||||
if (((tgt_dev->tgt_dev_sense[0] == 0x70) ||
|
||||
(tgt_dev->tgt_dev_sense[0] == 0x71)) && (cmd->cdb[1] & 1)) {
|
||||
PRINT_WARNING("%s: Fixed format of the saved sense, but "
|
||||
"descriptor format requested. Convertion will "
|
||||
"descriptor format requested. Conversion will "
|
||||
"truncated data", cmd->op_name);
|
||||
PRINT_BUFFER("Original sense", tgt_dev->tgt_dev_sense,
|
||||
tgt_dev->tgt_dev_valid_sense_len);
|
||||
@@ -1780,7 +1780,7 @@ static int scst_request_sense_local(struct scst_cmd *cmd)
|
||||
} else if (((tgt_dev->tgt_dev_sense[0] == 0x72) ||
|
||||
(tgt_dev->tgt_dev_sense[0] == 0x73)) && !(cmd->cdb[1] & 1)) {
|
||||
PRINT_WARNING("%s: Descriptor format of the "
|
||||
"saved sense, but fixed format requested. Convertion "
|
||||
"saved sense, but fixed format requested. Conversion "
|
||||
"will truncated data", cmd->op_name);
|
||||
PRINT_BUFFER("Original sense", tgt_dev->tgt_dev_sense,
|
||||
tgt_dev->tgt_dev_valid_sense_len);
|
||||
@@ -1866,7 +1866,7 @@ static int scst_reserve_local(struct scst_cmd *cmd)
|
||||
* around the reservation command either by ORDERED attribute, or by
|
||||
* queue draining, or etc. For case of SCST_CONTR_MODE_ONE_TASK_SET
|
||||
* there are no target drivers which can ensure even for ORDERED
|
||||
* comamnds order of their delivery, so, because initiators know
|
||||
* commands order of their delivery, so, because initiators know
|
||||
* it, also there's no point to do any extra protection actions.
|
||||
*/
|
||||
|
||||
@@ -1993,7 +1993,7 @@ out_done:
|
||||
*
|
||||
* Description:
|
||||
* Checks if the command can be executed or there are local events,
|
||||
* like reservatons, pending UAs, etc. Returns < 0 if command must be
|
||||
* like reservations, pending UAs, etc. Returns < 0 if command must be
|
||||
* aborted, > 0 if there is an event and command should be immediately
|
||||
* completed, or 0 otherwise.
|
||||
*
|
||||
@@ -2744,7 +2744,7 @@ static int scst_send_for_exec(struct scst_cmd **active_cmd)
|
||||
* path. We need the exact order of read and write between
|
||||
* def_cmd_count and expected_sn. Otherwise, we can miss case,
|
||||
* when expected_sn was changed to be equal to cmd->sn while
|
||||
* we are queuing cmd the deferred list after the expected_sn
|
||||
* we are queueing cmd the deferred list after the expected_sn
|
||||
* below. It will lead to a forever stuck command. But with
|
||||
* the barrier in such case __scst_check_deferred_commands()
|
||||
* will be called and it will take sn_lock, so we will be
|
||||
@@ -5363,7 +5363,7 @@ static int scst_abort_task(struct scst_mgmt_cmd *mcmd)
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
TRACE_MGMT_DBG("Abortind task (cmd %p, sn %d, set %d, tag %llu, "
|
||||
TRACE_MGMT_DBG("Aborting task (cmd %p, sn %d, set %d, tag %llu, "
|
||||
"queue_type %x)", cmd, cmd->sn, cmd->sn_set,
|
||||
(long long unsigned int)mcmd->tag, cmd->queue_type);
|
||||
|
||||
@@ -6339,7 +6339,7 @@ EXPORT_SYMBOL(scst_register_session_non_gpl);
|
||||
* SCST via scst_rx_cmd().
|
||||
*
|
||||
* - The caller must ensure that no scst_rx_cmd() or scst_rx_mgmt_fn_*() is
|
||||
* called in paralell with scst_unregister_session().
|
||||
* called in parallel with scst_unregister_session().
|
||||
*
|
||||
* - Can be called before result_fn() of scst_register_session() called,
|
||||
* i.e. during the session registration/initialization.
|
||||
@@ -6530,10 +6530,10 @@ static struct scst_cmd *__scst_find_cmd_by_tag(struct scst_session *sess,
|
||||
if (cmd->tag == tag) {
|
||||
/*
|
||||
* We must not count done commands, because
|
||||
* they were submitted for transmittion.
|
||||
* they were submitted for transmission.
|
||||
* Otherwise we can have a race, when for
|
||||
* some reason cmd's release delayed
|
||||
* after transmittion and initiator sends
|
||||
* after transmission and initiator sends
|
||||
* cmd with the same tag => it can be possible
|
||||
* that a wrong cmd will be returned.
|
||||
*/
|
||||
@@ -6569,7 +6569,7 @@ static struct scst_cmd *__scst_find_cmd_by_tag(struct scst_session *sess,
|
||||
/**
|
||||
* scst_find_cmd() - find command by custom comparison function
|
||||
*
|
||||
* Finds a command based on user supplied data and comparision
|
||||
* Finds a command based on user supplied data and comparison
|
||||
* callback function, that should return true, if the command is found.
|
||||
* Returns the command on success or NULL otherwise.
|
||||
*/
|
||||
@@ -6591,9 +6591,9 @@ struct scst_cmd *scst_find_cmd(struct scst_session *sess, void *data,
|
||||
list_for_each_entry(cmd, &sess->sess_cmd_list, sess_cmd_list_entry) {
|
||||
/*
|
||||
* We must not count done commands, because they were
|
||||
* submitted for transmittion. Otherwise we can have a race,
|
||||
* submitted for transmission. Otherwise we can have a race,
|
||||
* when for some reason cmd's release delayed after
|
||||
* transmittion and initiator sends cmd with the same tag =>
|
||||
* transmission and initiator sends cmd with the same tag =>
|
||||
* it can be possible that a wrong cmd will be returned.
|
||||
*/
|
||||
if (cmd->done)
|
||||
|
||||
Reference in New Issue
Block a user