mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
bluestore/bdev: initialize size when creating object.
The other partss of the struct are initialized by their ctors. Only for unint_64 there is no ctor. Otherwise ceph-dencoder tests will fail in comparing the exported output. [~/master36] wjw@cephdev.digiware.nl> build/bin/ceph-dencoder type bluestore_bdev_label_t select_test 1 encode export /tmp/typ-yFISvjvgj [~/master36] wjw@cephdev.digiware.nl> hexdump -C !$ hexdump -C /tmp/typ-yFISvjvgj 00000000 62 6c 75 65 73 74 6f 72 65 20 62 6c 6f 63 6b 20 |bluestore block | 00000010 64 65 76 69 63 65 0a 30 30 30 30 30 30 30 30 2d |device.00000000-| 00000020 30 30 30 30 2d 30 30 30 30 2d 30 30 30 30 2d 30 |0000-0000-0000-0| 00000030 30 30 30 30 30 30 30 30 30 30 30 0a 02 01 28 00 |00000000000...(.| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000050 00 00 70 74 03 04 00 00 00 00 00 00 00 00 00 00 |..pt............| 00000060 00 00 00 00 00 00 00 00 00 00 |..........| 0000006a [~/master36] wjw@cephdev.digiware.nl> build/bin/ceph-dencoder type bluestore_bdev_label_t select_test 1 encode decode encode export /tmp/typ-MjWXdCpzJ [~/master36] wjw@cephdev.digiware.nl> hexdump -C !$ hexdump -C /tmp/typ-MjWXdCpzJ 00000000 62 6c 75 65 73 74 6f 72 65 20 62 6c 6f 63 6b 20 |bluestore block | 00000010 64 65 76 69 63 65 0a 30 30 30 30 30 30 30 30 2d |device.00000000-| 00000020 30 30 30 30 2d 30 30 30 30 2d 30 30 30 30 2d 30 |0000-0000-0000-0| 00000030 30 30 30 30 30 30 30 30 30 30 30 0a 02 01 28 00 |00000000000...(.| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000050 00 00 73 64 00 00 00 00 00 00 00 00 00 00 00 00 |..sd............| 00000060 00 00 00 00 00 00 00 00 00 00 |..........| 0000006a Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
parent
9ec83c094c
commit
d411ee26fb
@ -33,7 +33,7 @@ namespace ceph {
|
||||
/// label for block device
|
||||
struct bluestore_bdev_label_t {
|
||||
uuid_d osd_uuid; ///< osd uuid
|
||||
uint64_t size; ///< device size
|
||||
uint64_t size = 0; ///< device size
|
||||
utime_t btime; ///< birth time
|
||||
string description; ///< device description
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user