7f34244 sanlock: ASYNC flag for lockspace add and rem

Authored and Committed by teigland 13 years ago
    sanlock: ASYNC flag for lockspace add and rem
    
    New SANLK_ADD_ASYNC for sanlock_add_lockspace(),
    and SANLK_REM_ASYNC for sanlock_rem_lockspace().
    
    The command will finish before the delta lease operation
    on disk.  With ASYNC, both return 0 if add/rem is
    successfully started.  sanlock_inq_lockspace() can be
    used to check the status of the lockspace after add
    or rem is started.
    
    sanlock_add_lockspace() still returns:
    
    0               add started (with ASYNC) or
                    completed successfully (sync)
    -EEXIST         lockspace already exists
    -EINPROGRESS    add lockspace in progress
    -EAGAIN         remove lockspace in progress
    -EINVAL         a lockspace exists with different properties
                    (same name but different disk locations, or
                    different names but same disk location)
    
    sanlock_rem_lockspace() still returns:
    
    0               remove started (with ASYNC) or
                    completed successfully (sync)
    -EINPROGRESS    remove lockspace in progress
    -ENOENT         no lockspace with matching name and
                    disk location is found
    
    sanlock_inq_lockspace() still returns:
    
    0               lockspace exists and is not being
                    added or removed
    -EINPROGRESS    add or rem is in progress
    -ENOENT         no lockspace with matching name and
                    disk location is found
    
    Signed-off-by: David Teigland <teigland@redhat.com>
    
        
file modified
+42 -8
file modified
+51 -18
file modified
+4 -2
file modified
+6 -0
file modified
+24 -1