]> git.baikalelectronics.ru Git - kernel.git/commit
dm mirror: do not degrade the mirror on discard error
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 12 Feb 2015 15:09:20 +0000 (10:09 -0500)
committerMike Snitzer <snitzer@redhat.com>
Sat, 14 Feb 2015 00:50:46 +0000 (19:50 -0500)
commitcd0f551fe4ce31c23c60fa0ed4d283cd0cb60940
tree726e3cf40cb8f128e0b9807f05fc255795c4454d
parent87fe1072e953b23de703cbd41ea5396bc374d3f4
dm mirror: do not degrade the mirror on discard error

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: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-raid1.c