• Mikulas Patocka's avatar
    dm mirror: do not degrade the mirror on discard error · 4d9b3860
    Mikulas Patocka authored
    commit f2ed51ac upstream.
    
    It may be possible that a device claims discard support but it rejects
    discards with -EOPNOTSUPP.  It happens when using loopback on ext2/ext3
    filesystem driven by the ext4 driver.  It may also happen if the
    underlying devices are moved from one disk on another.
    
    If discard error happens, we reject the bio with -EOPNOTSUPP, but we do
    not degrade the array.
    
    This patch fixes failed test shell/lvconvert-repair-transient.sh in the
    lvm2 testsuite if the testsuite is extracted on an ext2 or ext3
    filesystem and it is being driven by the ext4 driver.
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
    4d9b3860
dm-raid1.c 34.4 KB