aboutsummaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorAlexander Motin <[email protected]>2021-07-19 11:56:58 -0400
committerGitHub <[email protected]>2021-07-19 09:56:58 -0600
commiteecceeae9feee7f7398c423e81b276a394c8ffae (patch)
tree535f5082fd9059930798ed98fca730aad3b79da1 /module/os
parentca14e08cbff36cadd26928cb01222707930973cb (diff)
FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+
Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored-By: iXsystems, Inc. Closes #12378
Diffstat (limited to 'module/os')
-rw-r--r--module/os/freebsd/zfs/vdev_geom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/freebsd/zfs/vdev_geom.c b/module/os/freebsd/zfs/vdev_geom.c
index 2353c4600..6ac37da1c 100644
--- a/module/os/freebsd/zfs/vdev_geom.c
+++ b/module/os/freebsd/zfs/vdev_geom.c
@@ -381,7 +381,11 @@ vdev_geom_io(struct g_consumer *cp, int *cmds, void **datas, off_t *offsets,
int i, n_bios, j;
size_t bios_size;
+#if __FreeBSD_version > 1300130
+ maxio = maxphys - (maxphys % cp->provider->sectorsize);
+#else
maxio = MAXPHYS - (MAXPHYS % cp->provider->sectorsize);
+#endif
n_bios = 0;
/* How many bios are required for all commands ? */