On Wed, 26 Aug 2009 16:21:02 -0700 (PDT), John Forte wrote:
  ... ... ...
> 4.2 stmfSetAluaState
> 
> NAME
>     stmfSetAluaState
> 
> SYNOPSIS
>     cc [ flag... ] file... -lstmf [ library... ]
>     #include <libstmf.h>
> 
>     int stmfSetAluaState(boolean_t enabled, uint8_t node)
> 
> PARAMETERS
>     enabled     B_TRUE when enabling ALUA mode
>                 B_FALSE when disabling ALUA mode

I'm having trouble understanding what is going on here.  Should "mode"
in the above two lines be "node"?

> 
>     node        Must be the value 0 or 1
> 
> DESCRIPTION
>     The stmfSetAluaState() function sets the Asymmetric Logical Unit Access
>     State (ALUA) mode for STMF. When enabled is set to B_FALSE, node is 
> ignored,
>     otherwise, node must be set to 0 or 1.  The node setting must be different
>     for each node in a paired config. This should be called only after the
>     STMF proxy door service has been initialized(See 
> stmfInitProxyDoor(3STMF)).
>     When the ALUA state is enabled, all STMF logical units will be
>     registered on the peer node as standby logical units. The standby logical
>     units can then be exported to any SCSI initiator using the existing
>     mechanisms in STMF, stmfAddViewEntry(3STMF) or the add-view
>     subcommand of stmfadm(1M). Note: If ALUA mode is already enabled,
>     it is valid to call this interface again with enabled set to B_TRUE.
>     This action would result in a re-initialization of the ALUA mode. This
>     can be used during recovery of a failed peer node.

According to the Note above, it is not an error to call
stmfSetAluaState(B_TRUE, node) to reinitialize node if had it previously
been enabled.

> 
> RETURN VALUES
> 
>     The following values are returned:
> 
>     STMF_ERROR_INVALID_ARG      Either enabled or node was incorrectly set.
> 
>     STMF_STATUS_SUCCESS         The API call was successful

According to the above two lines, stmfSetAluaState() is supposed to
return STMF_ERROR_INVALID_ARG (because it was enabled) and
STMF_STATUS_SUCCESS (if it successfully reinitializes node)???

  ... ... ...
> 
> 4.3 stmfGetAluaState
> 
> NAME
>     stmfGetAluaState
> 
> SYNOPSIS
>     cc [ flag... ] file... -lstmf [ library... ]
>     #include <libstmf.h>
> 
>     int stmfGetAluaState(boolean_t *enabled, uint8_t *node)
> 
> PARAMETERS
>     enabled     set to B_TRUE or B_FALSE on success
> 
>     node        set to 0 or 1 on success
> 
> DESCRIPTION
>     The stmfGetAluaState() function returns the Asymmetric Logical Unit Access
>     State (ALUA) mode for STMF along with the node setting.
> 
> RETURN VALUES
> 
>     The following values are returned:
> 
>     STMF_ERROR_INVALID_ARG      Either enabled or node was NULL.
> 
>     STMF_STATUS_SUCCESS         The API call was successful

So, if I call stmfSetAluaState(B_TRUE, 0) and stmfSetAluaState(B_TRUE,
1) and then call stmfGetAluaState(&state, &node) what is it supposed to
do?  On which node is it going to report?  Since both nodes have been
enabled, it says that it is going to return STMF_ERROR_INVALID_ARG.
But if it successfully sets state and node, it also says it will return
STMF_STATUS_SUCCESS???

  - Don

Reply via email to