summaryrefslogtreecommitdiff
path: root/src/mscp.c
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2024-04-26 18:05:12 +0900
committerRyo Nakamura <upa@haeena.net>2024-04-26 23:44:46 +0900
commit01fe30efc75c035c9815c830d9310e460b6d3497 (patch)
treee10df813c89e051580b5079ed00bbaa6d8cf00ec /src/mscp.c
parent61199acc7b5b3d8c7b20e27ee6baade2a4eaa489 (diff)
remove limitation that min/max chunk size must be a multiple of page size
Also mentioned by Issue #20.
Diffstat (limited to 'src/mscp.c')
-rw-r--r--src/mscp.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/mscp.c b/src/mscp.c
index 857f002..61d31fb 100644
--- a/src/mscp.c
+++ b/src/mscp.c
@@ -158,23 +158,8 @@ static int validate_and_set_defaut_params(struct mscp_opts *o)
if (o->min_chunk_sz == 0)
o->min_chunk_sz = DEFAULT_MIN_CHUNK_SZ;
- else {
- if (o->min_chunk_sz < getpagesize() ||
- o->min_chunk_sz % getpagesize() != 0) {
- priv_set_errv("min chunk size must be "
- "larget than and multiple of page size %d: %lu",
- getpagesize(), o->min_chunk_sz);
- return -1;
- }
- }
if (o->max_chunk_sz) {
- if (o->max_chunk_sz < getpagesize() ||
- o->max_chunk_sz % getpagesize() != 0) {
- priv_set_errv("min chunk size must be larget than and "
- "multiple of page size %d: %lu",
- getpagesize(), o->max_chunk_sz);
- }
if (o->min_chunk_sz > o->max_chunk_sz) {
priv_set_errv("smaller max chunk size than "
"min chunk size: %lu < %lu",