From 8ec3aed516980e30aaacd071d8560a9afc9163f8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 17 Oct 2013 16:46:10 -0700 Subject: [PATCH] common/buffer: fix crc_map types Signed-off-by: Sage Weil --- src/common/buffer.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index d4589653d428f..221a9977109dc 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -77,7 +77,7 @@ static uint32_t simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZE atomic_t nref; Spinlock crc_lock; - map, pair > crc_map; + map, pair > crc_map; raw(unsigned l) : data(NULL), len(l), nref(0) { } @@ -106,18 +106,18 @@ static uint32_t simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZE bool is_n_page_sized() { return (len & ~CEPH_PAGE_MASK) == 0; } - bool get_crc(const pair &fromto, - pair *crc) const { + bool get_crc(const pair &fromto, + pair *crc) const { Spinlock::Locker l(crc_lock); - map, pair >::const_iterator i = + map, pair >::const_iterator i = crc_map.find(fromto); if (i == crc_map.end()) return false; *crc = i->second; return true; } - void set_crc(const pair &fromto, - const pair &crc) { + void set_crc(const pair &fromto, + const pair &crc) { Spinlock::Locker l(crc_lock); crc_map[fromto] = crc; } @@ -1315,8 +1315,8 @@ __u32 buffer::list::crc32c(__u32 crc) const ++it) { if (it->length()) { raw *r = it->get_raw(); - pair ofs(it->offset(), it->offset() + it->length()); - pair ccrc; + pair ofs(it->offset(), it->offset() + it->length()); + pair ccrc; if (r->get_crc(ofs, &ccrc)) { if (ccrc.first == crc) { // got it already -- 2.39.5