Change CAS_BIO_MAX_VECS value

Previously when user tried to allocate to big bio he recieved NULL. As the
behavior was changed to `BUG()` passing out of range value is no longer legal.

Limiting the requested bio size to BIO_MAX_PAGES (on the older kernels) or to
BIO_MAX_VECS (on the newer ones) eliminates the problem as the macros represent
the max possible value.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2022-12-28 13:45:18 +01:00
parent bc0c8c1bf5
commit 4753374b1b
2 changed files with 4 additions and 4 deletions

View File

@@ -20,9 +20,9 @@ check() {
apply() {
case "$1" in
"1")
;;
add_define "CAS_BIO_MAX_VECS ((uint32_t)BIO_MAX_VECS)" ;;
"2")
add_define "BIO_MAX_VECS ((uint32_t)(-1))" ;;
add_define "CAS_BIO_MAX_VECS ((uint32_t)BIO_MAX_PAGES)" ;;
*)
exit 1
esac