]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/osd_types: let pg_log_t::approx_size() return uint64_t 28732/head
authorKefu Chai <kchai@redhat.com>
Tue, 2 Jul 2019 06:00:01 +0000 (14:00 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Jul 2019 06:03:51 +0000 (14:03 +0800)
commiteb5ba3a28ddbc270dd268b79906c25c6a2a73d16
tree23c188676674b61b06ea0ecb02a35c8466c8cb38
parent10a953afc8f803e50c96354470fb114b33e62599
osd/osd_types: let pg_log_t::approx_size() return uint64_t

because both `head.version` and `tail.version` are of `uint64_t`, there
is no need to cast the difference between them to `size_t` which could
be a 32-bit unsigned integer on 32bit platforms. also, by casting it to
`size_t` makes it a little bit more difficult to compare it with
`osd_pg_log_trim_max` option, which is of `uint64_t`, as `std::min()`
requires both its parameters to be the same type if we want to use
tempalte parameter type deduction.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/osd_types.h