• Abhijith Das's avatar
    GFS2: Fix fstrim boundary conditions · 6a98c333
    Abhijith Das authored
    
    
    This patch correctly distinguishes two boundary conditions:
    
    1. When the given range is entire within the unaccounted space between
       two rgrps, and
    2. The range begins beyond the end of the filesystem
    
    Also fix the unit of the returned value r.len (total trimming) to be in bytes 
    instead of the (incorrect) 512 byte blocks
    
    With this patch, GFS2 passes multiple iterations of all the relevant xfstests
    (251, 260, 288) with different fs block sizes.
    Signed-off-by: default avatarAbhi Das <adas@redhat.com>
    Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
    6a98c333