Added libexpat dependency
client: Wait for caps to flush when flushing metadata.

Embarrassingly, this conditional has been backwards since
I committed it in 818e7939. But we want to do the wait when
we did do the flush and are syncing metadata. As the code
previously stood, we only did the wait when we didn't care,
and it didn't wait anyway since it was waiting for 0. So,
bad all around.
Signed-off-by: Greg Farnum <greg@inktank.com>
client: return errors to the user if fsync fails

To do so, we allow callers of _flush(Inode) to pass in a Context
as well. This Context is then given to the ObjectCacher as
the completion callback instead of the C_Client_PutInode that
it uses by default. _fsync() passes in a SafeCond which is
pointing to its return code, and presto! The return code gets
a failure if the Objecter returns any.
To preserve existing semantics, _fsync() (and any similar
caller) is now required to take a reference to the inode.

However, this is a behavioral change: previously, a call to fsync
in the userspace code would simply spin as it waited for all the
data to flush out. That obviously wasn't desirable, but now a user
can call fsync, ignore the return value, and think that everything is
hunky-dory when in fact the client is repeatedly trying to flush out
the dirty data. Hrm...

This fixes the fsync case of #2753 for ceph-fuse.

Signed-off-by: Greg Farnum <greg@inktank.com>
install:  remove perl dependency

Change the filter in logrotate to use sed instead of perl, and remove the
package dependency on perl.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
cli test: add pg deep-scrub option to test

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
Note on host in ./doc/radosgw/config.rst

Some people have configured host with a FQDN or an IP
which prevents /etc/init.d/radosgw start to launch the daemon.
Edit rgw keystone url in ./doc/radosgw/config.rst

Won't work with the public port, it needs to be the admin port.
Edit endpoint-create in ./doc/radosgw/config.rst

internalurl and adminurl are mandatory. Typo in publicurl.
Merge pull request #38 from alram/master

Fixes in ./docs/radosgw/config.rst
Merge pull request #36 from cmello/master

libexpat dependency
os: default to 'journal aio = true'

Hooray, testing indicates this is a win!

Signed-off-by: Sage Weil <sage@inktank.com>
Relax Throttle::_reset_max conditions and associated unit tests

Removes a condition in Throttle::_reset_max by which the waiting queue is only
Signal()ed if the new maximum is lower than the current maximum.
There is no evidence of a use case where such a restriction would be
useful. In addition waking up a thread when the maximum increases
gives it a chance to immediately continue the suspended process
instead of waiting for the next put().

Create a new test file covering 100% of src/Throttle.{cc,h} lines of code.
The following methods are tested:

* Throttle::Throttle with and without a maximum
* Throttle::~Throttle when each pending Cond is deleted
* Throttle::take
* Throttle::get when updating the maximum ( lower or higher ),
  when going to sleep waiting for the count to lower under
  the maximum, when going to sleep because another thread is
  already asleep waiting
* Throttle::get_or_fail when there is no maximum,
  when requesting a count that is larger than the maximum, either
  when the current value is under the maximum or above the maximum.
* Throttle::wait when used to reset the maximum and wake up
  another thread asleep waiting

All asserts checking the arguments sanity are exercised ( negative argument
for Throttle::take etc. ).
Adds the LGPLv2+ licensing terms to COPYING along with the others.
Adds a Contributors section to the AUTHORS file.

Notes:
Testing asserts outputs verbose error messages that should be silenced
but it does not seem possible.

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #39 from dachary/master

Relax Throttle::_reset_max conditions and associated unit tests
mon: check correct length of command

Signed-off-by: Dan Mick <dan.mick@inktank.com>
osd: remove DecayCounter header

Neither the OSD nor the PG makes any use of this.

Signed-off-by: Greg Farnum <greg@inktank.com>
mds: add CEPH_FEATURE_MDSENC feature bit

This will cover the MDS cluster on upgrade, and determine which encoding
of the MDSMap they use for clients.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
 mds: Anchor now uses modern encoding

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
mds: SnapInfo, snaplink_t, sr_t now use modern encoding

This commit doesn't enable the dencoder integration due
to some build and compile issues, but we'll turn it
on later.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
client: rename client/SnapRealm files to avoid automake build conflict

We are about to move the MDS' SnapRealm into its own files, which conflicts.
The MDS is more important, so it wins the "SnapRealm" filename and we
move the client stuff to ClientSnapRealm.[h|cc].

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
mds: move SnapRealm into its own h/cc files

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