mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
scst: cleanups and clarifications
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6864 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1453,7 +1453,9 @@ struct scst_dev_type {
|
||||
* be started. Can be used to close open file handlers, which might
|
||||
* prevent the state switch.
|
||||
*
|
||||
* Called under scst_dg_mutex and no activities on the dev handler level.
|
||||
* Called under scst_dg_mutex and no activities on the dev handler level
|
||||
* (for implicit ALUA case supposed to be done by the user space via
|
||||
* "block" sysfs attribute as described in the README).
|
||||
*
|
||||
* OPTIONAL
|
||||
*/
|
||||
@@ -1465,7 +1467,9 @@ struct scst_dev_type {
|
||||
* be finished. Can be used to (re)open file handlers closed in
|
||||
* on_alua_state_change_start().
|
||||
*
|
||||
* Called under scst_dg_mutex and no activities on the dev handler level.
|
||||
* Called under scst_dg_mutex and no activities on the dev handler level
|
||||
* (for implicit ALUA case supposed to be done by the user space via
|
||||
* "block" sysfs attribute as described in the README).
|
||||
*
|
||||
* OPTIONAL
|
||||
*/
|
||||
|
||||
@@ -145,6 +145,13 @@ static struct scst_trace_log vdisk_local_trace_tbl[] = {
|
||||
|
||||
struct scst_vdisk_dev {
|
||||
uint64_t nblocks;
|
||||
|
||||
/*
|
||||
* Not protected, because assignments to aligned 64-bit integers are
|
||||
* atomic. At worst, accesses to it should be covered by ACCESS_ONCE(),
|
||||
* but not sure if that is really needed, so would prefer to keep it
|
||||
* away from the fast path.
|
||||
*/
|
||||
loff_t file_size; /* in bytes */
|
||||
|
||||
/*
|
||||
|
||||
@@ -954,7 +954,8 @@ out_fail:
|
||||
* group @tg->dg.
|
||||
*/
|
||||
static void __scst_tg_set_state(struct scst_target_group *tg,
|
||||
enum scst_tg_state state)
|
||||
enum scst_tg_state state,
|
||||
bool call_on_alua_state_change)
|
||||
{
|
||||
struct scst_dg_dev *dg_dev;
|
||||
struct scst_device *dev;
|
||||
@@ -1018,7 +1019,7 @@ int scst_tg_set_state(struct scst_target_group *tg, enum scst_tg_state state)
|
||||
if (res)
|
||||
goto out;
|
||||
|
||||
__scst_tg_set_state(tg, state);
|
||||
__scst_tg_set_state(tg, state, true);
|
||||
|
||||
mutex_unlock(&scst_dg_mutex);
|
||||
out:
|
||||
@@ -1325,7 +1326,7 @@ static void __scst_dg_remove(struct scst_dev_group *dg)
|
||||
list_del(&dg->entry);
|
||||
scst_dg_sysfs_del(dg);
|
||||
list_for_each_entry(tg, &dg->tg_list, entry)
|
||||
__scst_tg_set_state(tg, SCST_TG_STATE_OPTIMIZED);
|
||||
__scst_tg_set_state(tg, SCST_TG_STATE_OPTIMIZED, false);
|
||||
while (!list_empty(&dg->dev_list)) {
|
||||
dgdev = list_first_entry(&dg->dev_list, struct scst_dg_dev,
|
||||
entry);
|
||||
|
||||
Reference in New Issue
Block a user