Merged revisions 3635 via svnmerge from

https://vlnb@scst.svn.sourceforge.net/svnroot/scst/trunk

........
  r3635 | vlnb | 2011-06-27 21:08:31 -0400 (Mon, 27 Jun 2011) | 5 lines
  
   - Added CPU barriers around io_context_ready manipulations
   - Docs updates
   - Cleanups
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3636 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-06-28 01:13:44 +00:00
parent 2d400c4102
commit 618897d1af
5 changed files with 40 additions and 10 deletions

View File

@@ -277,6 +277,8 @@ in/out in Makefile:
kernel log and your initiator returns an error. Also report those
messages in the SCST mailing list scst-devel@lists.sourceforge.net.
Note, that not all SCSI transports support supplying expected values.
You should try to enable this option if you have a not working with
SCST pass-through device, for instance, an SATA CDROM.
- CONFIG_SCST_DEBUG_TM - if defined, turns on task management functions
debugging, when on LUN 6 some of the commands will be delayed for
@@ -383,6 +385,22 @@ had a major change, which made it heavily incompatible with pre-2.6.26
version. If you need pre-2.6.26 kernel, you need to use obsolete procfs
interface (see below).
SCST sysfs interface designed to be self descriptive and self
containing. This means that a high level managament tool for it can be
written once and automatically support any future sysfs interface
changes (attributes additions or removals, new target drivers and dev
handlers, etc.) without any modifications. Scstadmin is an example of
such management tool.
To implement that an management tool should not be implemented around
drivers and their attributes, but around common rules those drivers and
attributes follow. You can find those rules in SysfsRules file. For
instance, each SCST sysfs file (attribute) can contain in the last line
mark "[key]". It is automatically added to allow scstadmin and other
management tools to see which attributes it should save in the config
file. If you are doing manual attributes manipulations, you can ignore
this mark.
Root of SCST sysfs interface is /sys/kernel/scst_tgt. It has the
following entries:
@@ -432,10 +450,6 @@ following entries:
completed, it will return the result of this operation (0 for success
or -errno for error).
Each SCST sysfs file (attribute) can contain in the last line mark
"[key]". It is automatically added mark used to allow scstadmin to see
which attributes it should save in the config file. You can ignore it.
"Devices" subdirectory contains subdirectories for each SCST devices.
Content of each device's subdirectory is dev handler specific. See

View File

@@ -171,6 +171,8 @@ your favorite kernel configuration Makefile target, e.g. "make xconfig":
kernel log and your initiator returns an error. Also report those
messages in the SCST mailing list scst-devel@lists.sourceforge.net.
Note, that not all SCSI transports support supplying expected values.
You should try to enable this option if you have a not working with
SCST pass-through device, for instance, an SATA CDROM.
- CONFIG_SCST_DEBUG_TM - if defined, turns on task management functions
debugging, when on LUN 6 some of the commands will be delayed for
@@ -251,6 +253,22 @@ Module scst supports the following parameters:
SCST sysfs interface
--------------------
SCST sysfs interface designed to be self descriptive and self
containing. This means that a high level managament tool for it can be
written once and automatically support any future sysfs interface
changes (attributes additions or removals, new target drivers and dev
handlers, etc.) without any modifications. Scstadmin is an example of
such management tool.
To implement that an management tool should not be implemented around
drivers and their attributes, but around common rules those drivers and
attributes follow. You can find those rules in SysfsRules file. For
instance, each SCST sysfs file (attribute) can contain in the last line
mark "[key]". It is automatically added to allow scstadmin and other
management tools to see which attributes it should save in the config
file. If you are doing manual attributes manipulations, you can ignore
this mark.
Root of SCST sysfs interface is /sys/kernel/scst_tgt. It has the
following entries:
@@ -300,10 +318,6 @@ following entries:
completed, it will return the result of this operation (0 for success
or -errno for error).
Each SCST sysfs file (attribute) can contain in the last line mark
"[key]". It is automatically added mark used to allow scstadmin to see
which attributes it should save in the config file. You can ignore it.
"Devices" subdirectory contains subdirectories for each SCST devices.
Content of each device's subdirectory is dev handler specific. See

View File

@@ -2018,7 +2018,7 @@ void scst_zero_write_rest(struct scst_cmd *cmd)
TRACE_ENTRY();
len = scst_get_sg_buf_first(cmd, &buf, *cmd->write_sg,
*cmd->write_sg_cnt);
*cmd->write_sg_cnt);
while (len > 0) {
int cur_offs;
@@ -3077,9 +3077,9 @@ found:
TRACE_MGMT_DBG("IO context for t %p not yet "
"initialized, waiting...", t);
msleep(100);
barrier();
goto found;
}
smp_rmb();
TRACE_MGMT_DBG("Going to share IO context %p (res %p, ini %s, "
"dev %s, cmd_threads %p, grouping type %d)",
res->active_cmd_threads->io_context, res,

View File

@@ -1668,6 +1668,7 @@ out_wait:
"initialized", cmd_threads);
msleep(50);
}
smp_rmb();
}
if (res != 0)

View File

@@ -4328,6 +4328,7 @@ int scst_cmd_thread(void *arg)
mutex_unlock(&p_cmd_threads->io_context_mutex);
#endif
smp_wmb();
p_cmd_threads->io_context_ready = true;
spin_lock_irq(&p_cmd_threads->cmd_list_lock);