]> granicus.if.org Git - zfs/commitdiff
VDEV_REQ_FUA should be mapped to REQ_FUA
authorRichard Yao <ryao@gentoo.org>
Mon, 31 Aug 2015 15:36:32 +0000 (11:36 -0400)
committerRichard Yao <ryao@gentoo.org>
Wed, 2 Sep 2015 16:39:08 +0000 (12:39 -0400)
Pre-2.6.37 kernels support REQ_FUA in request flags, but not in BIO
flags. zvols are the only consumer of VDEV_REQ_FUA and since they are
passed requests, they should be obey the REQ_FUA flag like later
kernels. This optimization will only matter on 2.6.36 and 2.6.37 because
the zvol rework changes things to use bio, where we no longer are able
to distinguish on earlier kernels

Signed-off-by: Richard Yao <ryao@gentoo.org>
include/linux/blkdev_compat.h

index ef6fa3bbd62b003fab4dc18254e0c225eb5d6a77..cdcf12c420904684067fa1ba2a961efea13e219a 100644 (file)
@@ -458,7 +458,7 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags)
 #else
 #define        VDEV_WRITE_FLUSH_FUA            WRITE_BARRIER
 #define        VDEV_REQ_FLUSH                  REQ_HARDBARRIER
-#define        VDEV_REQ_FUA                    REQ_HARDBARRIER
+#define        VDEV_REQ_FUA                    REQ_FUA
 #endif
 
 /*