]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/db/log_format.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
6 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style license that can be
8 // found in the LICENSE file. See the AUTHORS file for names of contributors.
10 // Log format information shared by reader and writer.
11 // See ../doc/log_format.txt for more detail.
18 // Zero is reserved for preallocated files
27 // For recycled log files
28 kRecyclableFullType
= 5,
29 kRecyclableFirstType
= 6,
30 kRecyclableMiddleType
= 7,
31 kRecyclableLastType
= 8,
33 static const int kMaxRecordType
= kRecyclableLastType
;
35 static const unsigned int kBlockSize
= 32768;
37 // Header is checksum (4 bytes), length (2 bytes), type (1 byte)
38 static const int kHeaderSize
= 4 + 2 + 1;
40 // Recyclable header is checksum (4 bytes), type (1 byte), log number
41 // (4 bytes), length (2 bytes).
42 static const int kRecyclableHeaderSize
= 4 + 1 + 4 + 2;
45 } // namespace rocksdb