This also increases the buffer size from 8 MB to the current value of
COPYCHUNK_MAX_TOTAL_LEN which is 16 MB.
For the typical case when vfswrap_copy_chunk_send is called from the SMB
layer for an copy_chunk ioctl() the parameter "num" is guaranteed to be
at most 1 MB though.
It will only be larger for special callers like vfs_fruit for their
special implementation of copyfile where num will be the size of a file
to copy.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
#include "lib/util/tevent_ntstatus.h"
#include "lib/util/sys_rw.h"
#include "lib/pthreadpool/pthreadpool_tevent.h"
+#include "librpc/gen_ndr/ndr_ioctl.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
}
vfs_cc_state->buf = talloc_array(vfs_cc_state, uint8_t,
- MIN(num, 8*1024*1024));
+ MIN(num, COPYCHUNK_MAX_TOTAL_LEN));
if (tevent_req_nomem(vfs_cc_state->buf, req)) {
return tevent_req_post(req, ev);
}