• Stefan Bader's avatar
    [PATCH] dm: use private biosets · 9faf400f
    Stefan Bader authored
    I found a problem within device-mapper that occurs in low-mem situations.  It
    was found using a mirror target but I think in theory it would hit any setup
    that stacks device-mapper devices (like LVM on top of multipath).
    
    Since device-mapper core uses the common fs_bioset in clone_bio(), and a
    private, but still global, bio_set in split_bvec() it is possible that the
    filesystem and the first level target successfully get bios but the lower
    level target doesn't because there is no more memory and the pool was drained
    by upper layers.  So the remapping will be stuck forever.  To solve this
    device-mapper core needs to use a private bio_set for each device.
    Signed-off-by: default avatarStefan Bader <Stefan.Bader@de.ibm.com>
    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>
    9faf400f
dm.c 28.4 KB