summaryrefslogtreecommitdiff
path: root/scripts/bash-completion
diff options
context:
space:
mode:
authorHuiwen He <hehuiwen@kylinos.cn>2026-07-03 13:32:57 +0800
committerSteve French <stfrench@microsoft.com>2026-07-13 10:37:55 -0500
commit9e4ec3be67af41ab859302d7109b34976efd9258 (patch)
treec15adb91650468c25f10e2d7434f57d991b9db67 /scripts/bash-completion
parentb09ae45d85dc816987a71db9eebc54b0ae288e94 (diff)
smb/client: reduce fallocate zero buffer allocation
The fallocate emulation allocates a 1 MiB zero-filled buffer even though each SMB2_write request is limited to SMB2_MAX_BUFFER_SIZE, which is 64 KiB. A high-order 1 MiB allocation is more likely to fail on a fragmented system. Allocate only the smaller of the requested range and SMB2_MAX_BUFFER_SIZE, and reuse that zero-filled buffer for every write request. Also reject a successful write that makes no progress to avoid looping indefinitely. This reduces the contiguous allocation required by fallocate emulation without changing the written data or range semantics. Signed-off-by: Huiwen He <hehuiwen@kylinos.cn> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/bash-completion')
0 files changed, 0 insertions, 0 deletions