9488ad2 sanlock: Fail read_resource_owners with incorrect align size

Authored and Committed by nsoffer 5 years ago
    sanlock: Fail read_resource_owners with incorrect align size
    
    Previously if sector size was not set, we modified both sector size and
    align size, dropping the caller align size silently.
    
    This can cause two issues:
    
    - User align size was correct, but sanlock guessed the wrong value -
      in this case sanlock logs a debug message and perform another read.
    
    - User align size was incorrect, but sanlock guess was correct, hiding a
      bug in caller code.
    
    Change the behaviour to be more consistent with the way we validate
    sector size, and reject invalid value set by the user.
    
    Signed-off-by: Nir Soffer <nsoffer@redhat.com>
    
        
file modified
+13 -4
file modified
+0 -1