os/chain_listxattr: fix leak fix

e22347df3854a5c5ebc6631c62d70447d67d722d added a bad goto; just free
explicitly instead.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
test/rados/list.cc: we might get some objects more than once

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
test/osd/RadosModel.h: select and reserve roll_back_to atomically

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
PGLog: remove obsolete assert in merge_log

This assert assumes that if olog.head != log.head, olog contains
a log entry at log.head, which may not be true since pg splitting
might have left the log with arbitrary holes.

Related: 0c2769d3321bff6e85ec57c85a08ee0b8e751bcb
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
prio-q: initialize cur iterator

For new SubQueues `cur` is not intialized, so front/pop_front will freak
out. I honestly I have no idea how this hasn't been seen, but it was
being triggered frequently on OSX.

Fixes: #6686

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
sharedptr_registry.hpp: removed ptrs need to not blast contents

See the included unit test update.  Consider:
1) x = lookup_or_create(1, 1)
2) remove(1)
3) y = lookup_or_create(1, 2)
4) x.reset()
5) z = lookup(1)

The bug is that z will be null since x.reset() caused the
cleanup callback to remove y's key value from contents.

To fix this, contents also records the pointer value for
the weak_ptr.  The removal callback only removes the
key from contents if it matches the ptr in contents.

This should work since the pointer passed to the removal
callback must be unique up to that point since it has
not yet been deleted.

This allowed a pg removal -> pg recreation -> pg removal
sequence to cause the second pg removal entry to be
erroneously cleared by the first pg removal's destructor
as it finally made its way through the removal queue.

Fixes: #5951
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
[rgw] Set initialized to true after populating table in hex_to_num()

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Wrap hex_to_num table into class HexTable

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #766 from kri5/wip-5374

Rebase of Wip 5374 against master

Reviewed-by: Yehuda Sadeh <yehdua@inktank.com>
Merge pull request #792 from ceph/wip-doc-openstack

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
docs: Fix a typo in RGW documentation
ceph-object-corpus: revert accidental revert

from 5df3024d7847950672169069b9dc8c8dcb876019

Signed-off-by: Sage Weil <sage@inktank.com>
Really use the hostname, otherwise ambiguous

"hostname" can return either the hostname or the fqdn depending on
configuration.
This refers to the issue http://tracker.ceph.com/issues/6706

Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Merge branch 'next'
ceph: Fix compilation with GCC compiler

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
libcephfs: Fix compilation for C compiler

Use struct instead of class, even if it warns.

Warnings are lower priority than compilation break.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
test: add gcc compile test for installed headers

libcephfs/librados headers should work with gcc.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
common/buffer.cc: fix rebuild_page_aligned typo

Introduced: 66a9fbe2c7ba59b7cd034c17865adce3432cd2cb
Fixes: #6003
Signed-off-by: Samuel Just <sam.just@inktank.com>
auth: remove unused private var [-Wunused-private-field]

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
CrushTester: remove unused private var [-Wunused-private-field]

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>