Merge pull request #1425 from mmichal10/bio-max-pages
Change CAS_BIO_MAX_VECS value
This commit is contained in:
commit
8285bd076b
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -90,7 +90,7 @@ static inline uint32_t cas_io_iter_size_done(struct bio_vec_iter *iter)
|
||||
static inline uint32_t cas_io_iter_size_left(struct bio_vec_iter *iter)
|
||||
{
|
||||
if (iter->idx < iter->vec_size)
|
||||
return min(iter->vec_size - iter->idx, BIO_MAX_VECS);
|
||||
return min(iter->vec_size - iter->idx, CAS_BIO_MAX_VECS);
|
||||
return 0;
|
||||
/* TODO UNITTEST */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user