]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ObjectCacher: use uint64_t for target and max values
authorJosh Durgin <josh.durgin@inktank.com>
Tue, 11 Feb 2014 19:53:00 +0000 (11:53 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 11 Feb 2014 20:06:20 +0000 (12:06 -0800)
commitdb034acf546a72739ff6543241543f3bd651f3ae
treec759f63f7406a7a13aa195c80180800771afb864
parentbf8cf2d6d21a204a099347f3dcd5b48100b8c445
ObjectCacher: use uint64_t for target and max values

All the options are uint64_t, but the ObjectCacher was converting them
to int64_t. There's never any reason for these to be negative, so
change the type.

Adjust a few conditionals so that they only convert known-positive
signed values to uint64_t before comparing with the target and max
values. Leave the actual stats accounting as loff_t for now, since
bugs in accounting will have bad effects if negative values wrap
around.

Backport: emperor, dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/osdc/ObjectCacher.cc
src/osdc/ObjectCacher.h