s3:vfs: copy_chunk buffer size
Use a dynamically allocated copy_chunk buffer size with an upper bound
of 8 MB for now.
The previous size of 64 KB has proven to really hurt performance,
especially with "strict locking = yes".
The SMB2 protocol level maximum allowed copy_chunk size is 1 MB, that's
what will be used as buffer size in the typical case.
With the AAPL copyfile extension the requested copy_chunk size is the
size whole file, which would then make use of a larger buffer up to the
limit of 8 MB.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>