diff options
author | Gregory Farnum <greg@inktank.com> | 2013-09-23 15:48:04 -0700 |
---|---|---|
committer | Gregory Farnum <greg@inktank.com> | 2013-09-23 15:48:04 -0700 |
commit | 6200eeca5970163a883e6105a4e40508ea4a5e87 (patch) | |
tree | 43cb42246c2df332667f215dcbec92b2070b20ee | |
parent | 7741de0ba43dc47779736465bffa2c9bbcf8fa81 (diff) | |
parent | 91375d09f78ddf5c7590eaed60f4758a5f36878e (diff) | |
download | ceph-6200eeca5970163a883e6105a4e40508ea4a5e87.tar.gz |
Merge pull request #591 from ceph/wip-misc
Reviewed-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/common/Cond.h | 4 | ||||
-rw-r--r-- | src/common/Mutex.h | 4 | ||||
-rw-r--r-- | src/common/buffer.cc | 9 | ||||
-rw-r--r-- | src/include/buffer.h | 10 |
4 files changed, 14 insertions, 13 deletions
diff --git a/src/common/Cond.h b/src/common/Cond.h index e6a13ae48bb..46fdf159112 100644 --- a/src/common/Cond.h +++ b/src/common/Cond.h @@ -32,8 +32,8 @@ class Cond { Mutex *waiter_mutex; // don't allow copying. - void operator=(Cond &C) {} - Cond( const Cond &C ) {} + void operator=(Cond &C); + Cond(const Cond &C); public: Cond() : waiter_mutex(NULL) { diff --git a/src/common/Mutex.h b/src/common/Mutex.h index 06e435d49df..e26a090703d 100644 --- a/src/common/Mutex.h +++ b/src/common/Mutex.h @@ -46,8 +46,8 @@ private: PerfCounters *logger; // don't allow copying. - void operator=(Mutex &M) {} - Mutex( const Mutex &M ) {} + void operator=(Mutex &M); + Mutex(const Mutex &M); void _register() { id = lockdep_register(name); diff --git a/src/common/buffer.cc b/src/common/buffer.cc index 24a61724c8e..8da4c106d1b 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -1270,6 +1270,15 @@ int buffer::list::write_fd(int fd) const return 0; } +__u32 buffer::list::crc32c(__u32 crc) const +{ + for (std::list<ptr>::const_iterator it = _buffers.begin(); + it != _buffers.end(); + ++it) + if (it->length()) + crc = ceph_crc32c(crc, (unsigned char*)it->c_str(), it->length()); + return crc; +} void buffer::list::hexdump(std::ostream &out) const { diff --git a/src/include/buffer.h b/src/include/buffer.h index 077cf0d9b0b..f4a2f5c3264 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -420,15 +420,7 @@ public: ssize_t read_fd(int fd, size_t len); int write_file(const char *fn, int mode=0644); int write_fd(int fd) const; - __u32 crc32c(__u32 crc) { - for (std::list<ptr>::const_iterator it = _buffers.begin(); - it != _buffers.end(); - ++it) - if (it->length()) - crc = ceph_crc32c(crc, (unsigned char*)it->c_str(), it->length()); - return crc; - } - + __u32 crc32c(__u32 crc) const; }; /* |