Re: [PATCH] btrfs: cloned bios must not be iterated by bio_for_each_segment_all

2017-07-13 Thread Liu Bo
On Thu, Jul 13, 2017 at 06:15:36PM +0200, David Sterba wrote: > We've started using cloned bios more in 4.13, there are some specifics > regarding the iteration. Filipe found [1] that the raid56 iterated a > cloned bio using bio_for_each_segment_all, which is incorrect. The > cloned bios have wron

[PATCH] btrfs: cloned bios must not be iterated by bio_for_each_segment_all

2017-07-13 Thread David Sterba
We've started using cloned bios more in 4.13, there are some specifics regarding the iteration. Filipe found [1] that the raid56 iterated a cloned bio using bio_for_each_segment_all, which is incorrect. The cloned bios have wrong bi_vcnt and this could lead to silent corruptions. This patch adds