]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFV/ZoL: Fix zfs_vdev_aggregation_limit bounds checking
authormav <mav@FreeBSD.org>
Fri, 8 Mar 2019 18:49:27 +0000 (18:49 +0000)
committermav <mav@FreeBSD.org>
Fri, 8 Mar 2019 18:49:27 +0000 (18:49 +0000)
commitac6361987efa85abf7e2a615747c0f62d065a57b
treed306048efbe3944f9efab4af3047a12dcdb11898
parent1e1af27f310e60f19033775a01df59744106a3b3
MFV/ZoL: Fix zfs_vdev_aggregation_limit bounds checking

Update the bounds checking for zfs_vdev_aggregation_limit so that
it has a floor of zero and a maximum value of the supported block
size for the pool.

Additionally add an early return when zfs_vdev_aggregation_limit
equals zero to disable aggregation.  For very fast solid state or
memory devices it may be more expensive to perform the aggregation
than to issue the IO immediately.

Author: Brian Behlendorf <behlendorf1@llnl.gov>
zfsonlinux/zfs@a58df6f53687ac6d1dee21f60de41b2552a43201

MFV/ZoL: Cap maximum aggregate IO size

Commit 8542ef8 allowed optional IOs to be aggregated beyond
the specified aggregation limit.  Since the aggregation limit
was also used to enforce the maximum block size, setting
`zfs_vdev_aggregation_limit=16777216` could result in an
attempt to allocate an ABD larger than 16M.

Author: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6259
Closes #6270
zfsonlinux/zfs@2d678f779aba26a93314c8ee1142c3985fa25cb6
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c