summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2016-12-30 16:03:59 -0600
committerBrian Behlendorf <[email protected]>2017-02-03 10:25:07 -0800
commit39d65926c966cedda8215251d2a3e9fa6f0faccb (patch)
treed16cded5eba2ec956c76c12d68e00946cedc36dd /module
parenta57228e51cdac654deccfe69173cb5c4e0f28f00 (diff)
4.10 compat - BIO flag changes and others
[bio] The req_op enum was changed to req_opf. Update the "Linux 4.8 API" autotools checks to use an int to determine whether the various REQ_OP values are defined. This should work properly on kernels >= 4.8. [bio] bio_set_op_attrs() is now an inline function and can't be detected with #ifdef. Add a configure check to determine whether bio_set_op_attrs() is defined. Move the local definition of it from vdev_disk.c to blkdev_compat.h for consistency with other related compability shims. [bio] The read/write flags and their modifiers, including WRITE_FLUSH, WRITE_FUA and WRITE_FLUSH_FUA have been removed from fs.h. Add the new bio_set_flush() compatibility wrapper to replace VDEV_WRITE_FLUSH_FUA and set the flags appropriately for each supported kernel version. [vfs] The generic_readlink() function has been made static. If .readlink in inode_operations is NULL, generic_readlink() is used. [zol typo] Completely unrelated to 4.10 compat, fix a typo in the check for REQ_OP_SECURE_ERASE so that the proper macro is defined: s/HAVE_REQ_OP_SECURE_DISCARD/HAVE_REQ_OP_SECURE_ERASE/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #5499
Diffstat (limited to 'module')
-rw-r--r--module/zfs/vdev_disk.c7
-rw-r--r--module/zfs/zpl_inode.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
index 2c1a0bdfd..393737377 100644
--- a/module/zfs/vdev_disk.c
+++ b/module/zfs/vdev_disk.c
@@ -485,11 +485,6 @@ bio_map(struct bio *bio, void *bio_ptr, unsigned int bio_size)
return (bio_size);
}
-#ifndef bio_set_op_attrs
-#define bio_set_op_attrs(bio, rw, flags) \
- do { (bio)->bi_rw |= (rw)|(flags); } while (0)
-#endif
-
static inline void
vdev_submit_bio_impl(struct bio *bio)
{
@@ -643,7 +638,7 @@ vdev_disk_io_flush(struct block_device *bdev, zio_t *zio)
bio->bi_private = zio;
bio->bi_bdev = bdev;
zio->io_delay = jiffies_64;
- bio_set_op_attrs(bio, 0, VDEV_WRITE_FLUSH_FUA);
+ bio_set_flush(bio);
vdev_submit_bio(bio);
invalidate_bdev(bdev);
diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
index 0243a9b9c..41a833344 100644
--- a/module/zfs/zpl_inode.c
+++ b/module/zfs/zpl_inode.c
@@ -724,7 +724,9 @@ const struct inode_operations zpl_dir_inode_operations = {
};
const struct inode_operations zpl_symlink_inode_operations = {
+#ifdef HAVE_GENERIC_READLINK
.readlink = generic_readlink,
+#endif
#if defined(HAVE_GET_LINK_DELAYED) || defined(HAVE_GET_LINK_COOKIE)
.get_link = zpl_get_link,
#elif defined(HAVE_FOLLOW_LINK_COOKIE) || defined(HAVE_FOLLOW_LINK_NAMEIDATA)