d5e4def sanlock: add flags to specify sector size

Authored and Committed by teigland 6 years ago
    sanlock: add flags to specify sector size
    
    Add flags for specifying lease alignment and sector size
    to sanlock_write_lockspace() and sanlock_write_resource():
    
        ALIGN1M - create 1MB lockspace/resource which uses
        512 byte sector size i/o.
    
        ALIGN8M - create 8MB lockspace/resource which uses
        4096 byte sector size i/o.
    
    When neither flag is set, sanlock uses the existing method
    for determining alignment and sector size:
    
       . On block devices, the sector size reported by libblkid.
       . On files, always choose 512 byte sector size.
    
    The new flags are returned by read_lockspace/read_resource,
    regardless of whether they were used with write.  The
    sanlock_align() call continues to report the same values
    as before, which is the size that will be used when no
    ALIGN flag is given.  sanlock_align() can no longer be used
    to determine the alignment of an existing lockspace/resource.
    
    If a lockspace/resource is created with ALIGN8M on a file,
    it will not be usable by previous versions of sanlock.
    
    The sector size is included in the ondisk structures for
    lockspaces/resources as before.  sanlock now reads this
    value to determine the sector size to use with a
    lockspace/resource.  (In some cases, this requires an
    extra disk read.)
    
        
file modified
+50 -2
file modified
+73 -28
file modified
+8 -1
file modified
+122 -26
file modified
+74 -22
file modified
+3 -3
file modified
+3 -0
file modified
+25 -11
file modified
+1 -1
file modified
+41 -6
file modified
+4 -0
file modified
+77 -34
file modified
+63 -28
file modified
+4 -0
file modified
+3 -1
file modified
+14 -5
file modified
+32 -4
file modified
+21 -1