Skip to content
  • Stefan Behrens's avatar
    Btrfs: don't allow device replace on RAID5/RAID6 · 49688107
    Stefan Behrens authored
    
    
    This is not yet supported and causes crashes. One sad user reported
    that it destroyed his filesystem.
    
    One failure is in __btrfs_map_block+0xc1f calling kmalloc(0).
    
    0x5f21f is in __btrfs_map_block (fs/btrfs/volumes.c:4923).
    4918                            num_stripes = map->num_stripes;
    4919                            max_errors = nr_parity_stripes(map);
    4920
    4921                            raid_map = kmalloc(sizeof(u64) * num_stripes,
    4922                                               GFP_NOFS);
    4923                            if (!raid_map) {
    4924                                    ret = -ENOMEM;
    4925                                    goto out;
    4926                            }
    4927
    
    There might be more issues. Until this is really tested, don't allow
    users to start the procedure on RAID5/RAID6 filesystems.
    
    Signed-off-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    49688107