Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow change default transfer max size of uring file #574

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion include/ylt/thirdparty/asio/completion_condition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ namespace asio {
namespace detail {

// The default maximum number of bytes to transfer in a single operation.
enum default_max_transfer_size_t { default_max_transfer_size = 65536 };
enum default_max_transfer_size_t
{
#if defined(ASIO_HAS_FILE) \
&& defined(ASIO_HAS_IO_URING) \
&& defined(ASIO_SPEC_MAX_TRANSFER_SIZE)
default_max_transfer_size = ASIO_SPEC_MAX_TRANSFER_SIZE
#else
default_max_transfer_size = 65536
#endif
};

// Adapt result of old-style completion conditions (which had a bool result
// where true indicated that the operation was complete).
Expand Down
Loading