185bc1f sanlock: read and write apis for lockspace and resource

Authored and Committed by teigland 11 years ago
    sanlock: read and write apis for lockspace and resource
    
    - write_lockspace includes an arg to specify the io timeout
      written in the disk record.
    
    - read_lockspace provides the io timeout from the disk record.
    
    - read_lockspace/resource only require path and offset input.
      If host_id is zero or unspecified, host_id 1 is used.
      If other parameters are specified, they are used and verified.
    
      # sanlock client init -s s1:0:/dev/vg/leases:0
      # sanlock client init -r s1:r1:/dev/vg/leases:1048576
    
      # sanlock client read -s ::/dev/vg/leases:0
      s s1:1:/dev/vg/leases:0
      io_timeout 10
    
      # sanlock client read -r ::/dev/vg/leases:1048576
      r s1:r1:/dev/vg/leases:1048576:0
    
    Signed-off-by: David Teigland <teigland@redhat.com>
    
        
file modified
+186 -30
file modified
+179 -13
file modified
+55 -4
file modified
+7 -0
file modified
+25 -24
file modified
+7 -4
file modified
+35 -1
file modified
+1 -1
file modified
+52 -8
file modified
+32 -0
file modified
+4 -0
file modified
+29 -12
file modified
+77 -0
file modified
+18 -0
file modified
+1 -0
file modified
+21 -19