mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3:smbd: use lp_smbd_max_async_dosmode()
Parametric options have a performance impact, use the normal options added in the previous commit. "aio max threads" can only be calculated at run time and requires a handle to a pthreadpool_tevent which loadparm will never have. Because of that lp_smbd_max_async_dosmode() will always return 0 as default and it's up to us to calculate "aio max threads * 2" if lp_smbd_max_async_dosmode() returns 0. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
14132e89b4
commit
941d7e159a
@ -521,12 +521,10 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
max_threads = pthreadpool_tevent_max_threads(state->tp_chdir_safe);
|
||||
|
||||
state->max_async_dosmode_active = lp_parm_ulong(
|
||||
SNUM(conn), "smbd", "max async dosmode",
|
||||
max_threads * 2);
|
||||
|
||||
state->max_async_dosmode_active = lp_smbd_max_async_dosmode(
|
||||
SNUM(conn));
|
||||
if (state->max_async_dosmode_active == 0) {
|
||||
state->max_async_dosmode_active = 1;
|
||||
state->max_async_dosmode_active = max_threads * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user