dm_bio_restore(), called just before requeuing, restores and overwrites our bio flags. Attached patchlet fixes this.
Created attachment 113463 [details] Move setting BIO_RW_FAILFAST to map_io()
where does the overwriting happen? bio_record.h doesn't touch bi_rw
Brown paper bag. You're right. I got confused by the setting of bi_flags, but bi_rw_failfast is in a different field as you correctly point out; maybe I was looking for bugs a little bit _too_ hard. Closing bug, patch not needed ;)