32#include <seastar/core/file.hh>
33#include <seastar/core/iostream.hh>
34#include <seastar/core/shared_ptr.hh>
35#include <seastar/core/internal/api-level.hh>
36#include <seastar/util/modules.hh>
44SEASTAR_MODULE_EXPORT_BEGIN
47 static constexpr uint64_t window_size = 4 * 1024 * 1024;
49 uint64_t total_read = 0;
50 uint64_t unused_read = 0;
52 window current_window;
53 window previous_window;
54 unsigned read_ahead = 1;
56 friend class file_data_source_impl;
104 unsigned buffer_size = 65536;
115 uint64_t buffer_size = 8192) noexcept;
130SEASTAR_MODULE_EXPORT_END
Definition: iostream.hh:163
Definition: fstream.hh:46
A representation of a possibly not-yet-computed value.
Definition: future.hh:1240
Definition: shared_ptr.hh:268
Definition: iostream.hh:393
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
future< output_stream< char > > make_file_output_stream(file file, uint64_t buffer_size=8192) noexcept
future< data_sink > make_file_data_sink(file, file_output_stream_options) noexcept
unsigned write_behind
Number of buffers to write in parallel.
Definition: fstream.hh:106
size_t buffer_size
I/O buffer size.
Definition: fstream.hh:61
unsigned preallocation_size
Preallocate extents. For large files, set to a large number (a few megabytes) to reduce fragmentation...
Definition: fstream.hh:105
unsigned read_ahead
Maximum number of extra read-ahead operations.
Definition: fstream.hh:62
input_stream< char > make_file_input_stream(file file, uint64_t offset, uint64_t len, file_input_stream_options options={})
Creates an input_stream to read a portion of a file.
lw_shared_ptr< file_input_stream_history > dynamic_adjustments
Input stream history, if null dynamic adjustments are disabled.
Definition: fstream.hh:63
Definition: fstream.hh:96