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>