• NeilBrown's avatar
    md: Fix handling for devices from 2TB to 4TB in 0.90 metadata. · 27a7b260
    NeilBrown authored
    0.90 metadata uses an unsigned 32bit number to count the number of
    kilobytes used from each device.
    This should allow up to 4TB per device.
    However we multiply this by 2 (to get sectors) before casting to a
    larger type, so sizes above 2TB get truncated.
    
    Also we allow rdev->sectors to be larger than 4TB, so it is possible
    for the array to be resized larger than the metadata can handle.
    So make sure rdev->sectors never exceeds 4TB when 0.90 metadata is in
    used.
    
    Also the sanity check at the end of super_90_load should include level
    1 as it used ->size too. (RAID0 and Linear don't use ->size at all).
    Reported-by: default avatarPim Zandbergen <P.Zandbergen@macroscoop.nl>
    Cc: stable@kernel.org
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    27a7b260
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
bitmap.c Loading commit data...
bitmap.h Loading commit data...
dm-bio-record.h Loading commit data...
dm-crypt.c Loading commit data...
dm-delay.c Loading commit data...
dm-exception-store.c Loading commit data...
dm-exception-store.h Loading commit data...
dm-flakey.c Loading commit data...
dm-io.c Loading commit data...
dm-ioctl.c Loading commit data...
dm-kcopyd.c Loading commit data...
dm-linear.c Loading commit data...
dm-log-userspace-base.c Loading commit data...
dm-log-userspace-transfer.c Loading commit data...
dm-log-userspace-transfer.h Loading commit data...
dm-log.c Loading commit data...
dm-mpath.c Loading commit data...
dm-mpath.h Loading commit data...
dm-path-selector.c Loading commit data...
dm-path-selector.h Loading commit data...
dm-queue-length.c Loading commit data...
dm-raid.c Loading commit data...
dm-raid1.c Loading commit data...
dm-region-hash.c Loading commit data...
dm-round-robin.c Loading commit data...
dm-service-time.c Loading commit data...
dm-snap-persistent.c Loading commit data...
dm-snap-transient.c Loading commit data...
dm-snap.c Loading commit data...
dm-stripe.c Loading commit data...
dm-sysfs.c Loading commit data...
dm-table.c Loading commit data...
dm-target.c Loading commit data...
dm-uevent.c Loading commit data...
dm-uevent.h Loading commit data...
dm-zero.c Loading commit data...
dm.c Loading commit data...
dm.h Loading commit data...
faulty.c Loading commit data...
linear.c Loading commit data...
linear.h Loading commit data...
md.c Loading commit data...
md.h Loading commit data...
multipath.c Loading commit data...
multipath.h Loading commit data...
raid0.c Loading commit data...
raid0.h Loading commit data...
raid1.c Loading commit data...
raid1.h Loading commit data...
raid10.c Loading commit data...
raid10.h Loading commit data...
raid5.c Loading commit data...
raid5.h Loading commit data...