• Josef Bacik's avatar
    dm log writes: fix >512b sectorsize support · 228bb5b2
    Josef Bacik authored
    512b sectors vs device's physical sectorsize was not maintained
    consistently and as such the support for >512b sector devices has bugs.
    The log metadata expects native sectorsize but 512b sectors were being
    stored.  Also, device's sectorsize was assumed when assigning the
    bi_sector for blocks that were being logged.
    
    Fix this up by adding two helpers to convert between bio and dev
    sectors, and use these in the appropriate places to fix the problem and
    make it clear which units go where.  Doing so allows dm-log-writes use
    with 4k devices.
    Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    228bb5b2
dm-log-writes.c 20.8 KB