diff options
author | Brian Behlendorf <[email protected]> | 2016-07-27 18:06:17 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-07-29 14:48:09 -0700 |
commit | 76e5f6fe10ab8c9c8ae13e4c33ecb68f3d0ce5dc (patch) | |
tree | 19fa762b96d42fea8e6f1beadb8fd0e6f8ea1cd5 /include | |
parent | bbb1b6cea75ff8ff27742ce778664ddeec371a01 (diff) |
Linux 4.8 compat: REQ_PREFLUSH
The REQ_FLUSH flag was renamed REQ_PREFLUSH to avoid confusion with
REQ_OP_FLUSH. See https://github.com/torvalds/linux/commit/28a8f0d3
for complete details.
Signed-off-by: Tim Chase <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #4892
Issue #4899
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev_compat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h index 42b474b15..e263dc836 100644 --- a/include/linux/blkdev_compat.h +++ b/include/linux/blkdev_compat.h @@ -305,12 +305,23 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags) * The existence of these flags implies that REQ_FLUSH an REQ_FUA are * defined. Thus we can safely define VDEV_REQ_FLUSH and VDEV_REQ_FUA * compatibility macros. + * + * Linux 4.8 renamed the REQ_FLUSH to REQ_PREFLUSH but there was no + * functional change in behavior. */ #ifdef WRITE_FLUSH_FUA + #define VDEV_WRITE_FLUSH_FUA WRITE_FLUSH_FUA +#ifdef REQ_PREFLUSH +#define VDEV_REQ_FLUSH REQ_PREFLUSH +#define VDEV_REQ_FUA REQ_FUA +#else #define VDEV_REQ_FLUSH REQ_FLUSH #define VDEV_REQ_FUA REQ_FUA +#endif + #else + #define VDEV_WRITE_FLUSH_FUA WRITE_BARRIER #ifdef HAVE_BIO_RW_BARRIER #define VDEV_REQ_FLUSH (1 << BIO_RW_BARRIER) @@ -319,6 +330,7 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags) #define VDEV_REQ_FLUSH REQ_HARDBARRIER #define VDEV_REQ_FUA REQ_FUA #endif + #endif /* |