]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/file/readahead_file_info.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / file / readahead_file_info.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
5
6 #pragma once
7
8 #include <cstddef>
9 #include <cstdint>
10
11 #include "rocksdb/rocksdb_namespace.h"
12
13 namespace ROCKSDB_NAMESPACE {
14
15 // struct ReadaheadFileInfo contains readahead information that is passed from
16 // one file to another file per level during iterations. This information helps
17 // iterators to carry forward the internal automatic prefetching readahead value
18 // to next file during sequential reads instead of starting from the scratch.
19
20 struct ReadaheadFileInfo {
21 struct ReadaheadInfo {
22 size_t readahead_size = 0;
23 int64_t num_file_reads = 0;
24 };
25
26 // Used by Data block iterators to update readahead info.
27 ReadaheadInfo data_block_readahead_info;
28
29 // Used by Index block iterators to update readahead info.
30 ReadaheadInfo index_block_readahead_info;
31 };
32
33 } // namespace ROCKSDB_NAMESPACE