objclass: add api calls to get/set xattrs

added the following functions:
  cls_cxx_getxattr
  cls_cxx_getxattrs
  cls_cxx_setxattr

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls_lock: objclass for advisory locking

Providing an objclass to create and manipulate advisory
locking. Also providing a client api to control it. A lock
may either be exclusively locked or shared among multiple
lockers. A locker is identified by the rados client name, and
by a cookie-string.
A lock may be assigned with a tag that every operation on that
lock should use. A lock can be unlocked by the client that locked
it, or may be broken by other clients.
When a non-zero lock duration is assigned to a lock by a locker,
that locker expires after that time duration.
A lock may have a description.
Locks on a specific object can be listed. Lockers of a specific
lock can be enumerated (by get_info).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rados tool: add advisory lock control commands

Can now lock, break lock, list locks and show lock
info.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rados: lock info keeps expiration, not duration

We pass duration in the request, but internally we keep
the expiration.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls_log: update a comment

Was missing output param description.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls_lock: document lock properties

Added some comments about different lock properties.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
cls_lock: cls_lock_id_t -> cls_lock_locker_id_t

Renamed type to make more sense.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rados::cls::lock: move api types into namespace

By popular demand, moved public api into namespace. This
required some changes to ceph_dencoder to get some template
annoyance working.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
doc: update information about stable vs development releases

Signed-off-by: Sage Weil <sage@inktank.com>
os: KeyValueDB: allow finer-grained control of transaction operations

This patch introduces the possibility of using single key/value
modification operations into the transaction interface.

Until now, any 'set' or 'rmkeys' operations required a map of keys to be
provided to the function, which made the task of removing or setting a
bunch of keys easier. Doing these same operations for a single key,
however, would entail creating a map with a single key.

Instead, this patch adds two new virtual abstract functions, to be
implemented by derivative classes, which set or remove one single
key/value, and we then implement the map-based, existing functions in
terms of these new functions.

We also update the derivative classes of KeyValueDB in order to reflect
these changes (i.e., LevelDBStore and KeyValueDBMemory).

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
os: KeyValueDB: Add virtual raw_key() function to return (prefix,key) pair

If we were to use solely the key() function, whenever we had a key with,
say, prefix 'Foo' and key 'Bar', the key() function would return something
similar to 'Foo<separator>Bar'. Therefore, obtaining the prefix and the key
would require one to be aware of the separator used, and, since that is
implementation specific, we can't rely on such prior knowledge.

This new function must then be implemented by any derivative class of
KeyValueDB, and is expected to return a pair (prefix,key) for the
current iterator's position -- the key() function should behave as
previously, returning only the 'key' component of the pair.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
wireshar/ceph/packet-ceph.c: fix eol

Removing extra char from dos eol format.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Wireshark dissector updated, work with the current development tree of wireshark. The way I patched it is not really clean, but it can be useful if some people quickly need to inspect ceph network flows.
Merge branch 'wip-2763'
Merge branch 'next'
Merge branch 'next'
admin_socket: dump config in json; add test

Signed-off-by: Sage Weil <sage@inktank.com>
admin_socket: json output, always

If the perfcounters stuff were refactored to use the Formatter, we could
put the JSONFormatter in the admin_socket code and make this a bit less
annoying.  Later.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: ignore osd_alive messages from down osds

Signed-off-by: Sage Weil <sage@inktank.com>
mon: ignore pgtemp messages from down osds

Signed-off-by: Sage Weil <sage@inktank.com>