Iterates over the provided source store's keys and copies them to the
provided destination store.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reuse 'list()' function to traverse the store and calc not only version's
crcs, but also calc the store's crc.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
This patch prevents us from inadvertently reducing sparse file sizes during recovery.
We also reduce some code duplication by using eval() directly in do_file_recover()
instead of reproducing the parts we care about.
Reviewed-by: Greg Farnum <greg@inktank.com>
On my old box:
- matching cached values is a big win (free), obviously
- the adjustment is the same speed as redoing the calculation. this
is probably because the data is already in L1/L2 cache; we still
save memory bandwidth.
Signed-off-by: Sage Weil <sage@inktank.com>
This is similar to the alloc tracking, but I've added a method to let
you enable it easily (in this case, from the unit test).
Signed-off-by: Sage Weil <sage@inktank.com>
ubuntu@burnupi06:~$ tail -f /var/log/ceph/ceph-osd.1.log
2013-02-07 17:00:30.565749 7fdb09e6b700 0 <cls> cls/rbd/cls_rbd.cc:1615: error reading id for name 'sds': -2
2013-02-07 17:00:30.566301 7fdb0a66c700 0 <cls> cls/rbd/cls_rbd.cc:1521: error reading name to id mapping: -2
2013-02-07 17:03:54.085700 7fdb0a66c700 0 <cls> cls/rbd/cls_rbd.cc:1615: error reading id for name 'sdfsd': -2
2013-02-07 17:03:54.086143 7fdb09e6b700 0 <cls> cls/rbd/cls_rbd.cc:1521: error reading name to id mapping: -2
Fixes: #4047
Signed-off-by: Sage Weil <sage@inktank.com>
In commit 4f403c26dc we broke the general
non-daemon case.
Also make a note in the release notes.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Fixes: #5716
When invalid root pools specified (don't start with a period) we return
with an error instead of asserting.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
In commit 55d279b985 we tried to fix a race
between rollback and snap removal, but got the logic wrong: we need to
prevent *snap removal* on in-use snaps, not prevent multiple rollbacks on
the same snap.
Fixes: #6254 (again)
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
This fixes the fix in 64774e5792 which mixed
up the return value and errno.
Fixes: #6550
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
We generally do want an admin socket and log, and people usually run these
as root. This is more confusing than useful.
Fixes: #6334
Signed-off-by: Sage Weil <sage@inktank.com>
If GenericFileStoreBackend::do_fiemap returns anything other than 0, then
fiemap will not be allocated. However,
GenericFileStoreBackend::detect_features will free fiemap regardless,
triggering an assertion in tcmalloc. The attached patch will fix the bug
by only freeing fiemap when necessary.
In my case, do_fiemap returns -ENOSYS because fiemap is not implemented
on FreeBSD. However, this bug could also happen on Linux when do_fiemap
returns -ENOMEM.
Fixes: #6504
Signed-off-by: Alan Somers <asomers@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
If m_list.size() == 0, then calling select_generated(0) will result in
uninitialized data being assigned to m_object, which will cause a segfault
down the road. This patch fixes that.
To Reproduce:
$ ceph-dencoder type MWatchNotify select_test 0 encode decode
Segmentation fault (core dumped)
After the patch:
$ ./ceph-dencoder type MWatchNotify select_test 0 encode decode
error: invalid id for generated object
$ echo $?
1
Fixes: #6510
Signed-off-by: Alan Somers <asomers@gmail.com>
Otherwise you have to explicitly create it on a new checkout.
Also mkdir -p for consistency, tho it's not needed if dev/ is already
there.
Signed-off-by: Sage Weil <sage@inktank.com>
Fixes: #6554
Backport: cuttlefish, dumpling
Default log level was just too high, bring it down a bit.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>