~~~~
./include/atomic.h: In member function 'size_t ceph::atomic_t::inc()':
./include/atomic.h:42:36: error: 'AO_fetch_and_add1' was not declared in this scope
return AO_fetch_and_add1(&val) + 1;
^
./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()':
./include/atomic.h:45:42: error: 'AO_fetch_and_sub1_write' was not declared in this scope
return AO_fetch_and_sub1_write(&val) - 1;
^
./include/atomic.h: In member function 'void ceph::atomic_t::add(size_t)':
./include/atomic.h:48:36: error: 'AO_fetch_and_add' was not declared in this scope
AO_fetch_and_add(&val, add_me);
^
./include/atomic.h: In member function 'void ceph::atomic_t::sub(int)':
./include/atomic.h:52:48: error: 'AO_fetch_and_add_write' was not declared in this scope
AO_fetch_and_add_write(&val, (AO_t)negsub);
^
./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()':
./include/atomic.h:46:5: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[5]: *** [cls/user/cls_user_client.o] Error 1
~~~~
Ilya Dryomov [Fri, 16 May 2014 15:03:13 +0000 (19:03 +0400)]
OSDMonitor: set next commit in mon primary-affinity reply
Commit 8c5c55c8b47e ("mon: set next commit in mon command replies")
fixed MMonCommand replies to include the right version, but the
primary-affinity handler was authored before that. Fix it.
Dmitry Smirnov [Fri, 16 May 2014 10:26:38 +0000 (20:26 +1000)]
sample.ceph.conf: minor update
* Moved filestore settings above [osd.*] declarations otherwise
(if uncommented) those settings might be applied only to last
OSD which is not very obvious.
* Few options added.
Greg Farnum [Thu, 15 May 2014 23:50:43 +0000 (16:50 -0700)]
OSD: fix an osdmap_subscribe interface misuse
When calling osdmap_subscribe, you have to pass an epoch newer than the
current map's. _maybe_boot() was not doing this correctly -- we would
fail a check for being *in* the monitor's existing map range, and then
pass along the map prior to the monitor's range. But if we were exactly
one behind, that value would be our current epoch, and the request would
get dropped. So instead, make sure we are not *in contact* with the monitor's
existing map range.
Signed-off-by: Greg Farnum <greg@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
John Spray [Tue, 13 May 2014 16:32:03 +0000 (17:32 +0100)]
doc: update instructions for RPM distros
Fix RPM building instructions: this has been broken since
libs3 was included inline in the ceph repo as a submodule.
"rpmbuild -tb" was concatenating the ceph.spec and
libs3.spec files, resulting in something that didn't work.
Also, the instructions suggested downloading a .tar.gz file
whereas the specfile requires a .tar.bz2 file.
Also, add a convenient yum command line for getting the compile
dependencies on Fedora 20.
Signed-off-by: John Spray <john.spray@inktank.com>
Greg Farnum [Mon, 12 May 2014 23:37:16 +0000 (16:37 -0700)]
OSD: verify that client ops are targeted correctly in the current epoch
We were previously only looking at the epoch the op was sent in, which meant
that if we had dropped responsibility somewhere between send_epoch and our
current epoch, we would queue up the op until a new osdmap came along. If it
never did, we could block all client IO against us...
Dmitry Smirnov [Mon, 12 May 2014 04:08:44 +0000 (14:08 +1000)]
prioritise use of `javac` executable (gcj provides it through alternatives).
On Debian this fixes FTBFS when gcj-jdk and openjdk-7-jdk are installed at
the same time because build system will use default `javac` executable
provided by current JDK through `update-alternatives` instead of blindly
calling GCJ when it is present.
Revert commit 40d56a97 (mds: optimize EMetaBlob::fullbit, remotebit,
nullbit encoding). This optimization creates small segments in the
result bufferlist of encoding EMetaBlob. Perf shows lots of CPU time
are used for allocating list node for bufferlist.
Yan, Zheng [Mon, 12 May 2014 02:24:51 +0000 (10:24 +0800)]
mds: properly clear new flag for stale client cap
CInode::encode_inodestat() should clear the 'new' flag of client
cap even when session is stale, because the 'new' flag prevents
Locker::issue_caps() from sending cap message to client.
Danny Al-Gaaf [Mon, 12 May 2014 00:33:44 +0000 (02:33 +0200)]
BtrfsFileStoreBackend.cc: fix ::unlinkat() result handling
Don't check for 'fd' but for the return value of the ::unlinkat() call.
Fix for:
[src/os/BtrfsFileStoreBackend.cc:72] -> [src/os/BtrfsFileStoreBackend.cc:74]:
(warning) Opposite conditions in nested 'if' blocks lead to a dead code block.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 12 May 2014 00:01:10 +0000 (02:01 +0200)]
rgw_user.cc: cleanup RGWAccessKeyPool::check_op()
Remove dead assignment and unsued variable 'secret_key'. Check
op_state.get_access_key() directly for emptiness without extra
variable. Fix comment above check for access key.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Sun, 11 May 2014 23:26:56 +0000 (01:26 +0200)]
MDBalancer.cc: remove some since 2009 unused code
Remove some since long time unused code and variables (commented out
since 2009).
Fix for:
[src/mds/MDBalancer.cc:757]: (style) Variable 'total_sent' is
assigned a value that is never used.
[src/mds/MDBalancer.cc:665]: (style) Variable 'total_goal' is
assigned a value that is never used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Sun, 11 May 2014 22:05:15 +0000 (00:05 +0200)]
test_cls_rbd.cc: use 'delete []' if 'new char[len]' was used
Fix for:
[src/test/cls_rbd/test_cls_rbd.cc:82]: (error) Mismatching allocation
and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:95]: (error) Mismatching allocation
and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:97]: (error) Mismatching allocation
and deallocation: b
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Sun, 11 May 2014 21:13:00 +0000 (23:13 +0200)]
test/ObjectMap/KeyValueDBMemory.cc: use empty() instead of size()
Use empty() instead of 'size() == 0' to fix:
[src/test/ObjectMap/KeyValueDBMemory.cc:83]: (performance)
Possible inefficient checking for 'db' emptiness.
[src/test/ObjectMap/KeyValueDBMemory.cc:97]: (performance)
Possible inefficient checking for 'db' emptiness.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Sun, 11 May 2014 09:52:04 +0000 (11:52 +0200)]
cls_kvs.cc: remove dead assignment
Fix for:
[src/key_value_store/cls_kvs.cc:383] -> [src/key_value_store/cls_kvs.cc:386]:
(performance) Variable 'r' is reassigned a value before the old one has been used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>