• Alasdair G. Kergon's avatar
    [PATCH] device-mapper: Fixes for 64-bit sector_t · ef2cda6f
    Alasdair G. Kergon authored
    Fix some bugs in device-mapper handling of 64-bit values, replacing
    dm_div_up() and dm_round_up() inlines with macros and removing some
    avoidable divisions of 64-bit numbers.
    
    The mirror region size is the granularity used to manage and monitor the
    data copying, typically 512KB, so 32 bits (of sectors) should be plenty to
    hold this.
    
    Taken together with the two earlier patches:
      "fix TB stripe data corruption" (a missing cast) and
      "stripe_width should be sector_t",
    I've now had 3 independent reports that this fixes device-mapper
    for devices with large stripes.
    
    Still awaiting test results for dm-crypt and dm-raid1.
    Signed-Off-By: default avatarAlasdair G Kergon <agk@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    ef2cda6f
dm-table.c 19.3 KB