unit tests for FileStore::_detect_fs when running on ext4

unit tests are added in test/filestore/store_test.cc for the
FileStore::_detect_fs method, when using ext4. It tests the following
situations:

 * without user_xattr, ext4 fails
 * mounted with user_xattr, ext4 fails if filestore_xattr_use_omap is false
 * mounted with user_xattr, ext4 succeeds if filestore_xattr_use_omap is true

The tests are grouped in an ext4 dedicated class

  TEST(EXT4StoreTest, _detect_fs)

The qa/workunits/filestore/filestore.sh script is added to prepare the
environment required for the unit tests ( create an image file,
formats it with ext4 etc.). It runs ceph_test_filestore with a sudo
to allow it to mount(2) and umount(2) the ext4 file system. It is
called with

  ceph_test_filestore --gtest_filter=EXT4StoreTest.*

to only run the ext4 dependent tests.

The filestore.sh script is meant to be used as part of teuthology
in order to increase the code coverage for src/os/FileStore.cc. It is
self tested and can be checked from the source directory with

  CEPH_TEST_FILESTORE=../../../src/ceph_test_filestore filestore.sh TEST

http://tracker.ceph.com/issues/4321 refs #4321

Signed-off-by: Loic Dachary <loic@dachary.org>
client: log inode when waiting on max size

Logging the specific inode that the get_caps()
is waiting for helps during debugging of stuck waiters.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
client: Kick waiters for max size

If the mds restarts without successfully logging a max size
cap update, the client waits indefinitely in Client::get_caps
on the waitfor_caps list.  So when the client gets an mds map
indicating a new active mds has replaced a down mds, we need to
kick the caps update request.  This patch mimics the behavior
in the kernel by setting the wanted_max_size
and requested_max_size to 0 and wakes up the waiters.

Fixes #4582.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Merge pull request #191 from ceph/wip-4582b

Fixes #4582.

Reviewed-by: Greg Farnum <greg@inktank.com>
ceph.spec.in: use %{_sbindir} instead of /usr/sbin

Use %{_sbindir} macro which points to /usr/sbin instead of
hard coded path.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Makefile.am: install ceph-* python scripts to /usr/bin directly

Install ceph-* scripts directly to $(prefix)$(sbindir) (which
normaly would be /usr/sbin) instead of moving it around after
installation in SPEC file or debian files.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph.spec.in: don't move ceph-disk* and ceph-create-keys around

Don't move these files around, they get installed now directly to
%{_sbindir}.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
debian/ceph.install: no need to move files to usr/sbin/

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph.spec.in: reorder and fix ceph file list

Reorder file list of ceph package. Fix handling of placeholder
directories, make use of directories marcros like %{_localstatedir}
for /var.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph.spec.in: use macros for standard directories

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph.spec.in: fix udev rules.d files handling

Move 50-rbd.rules into the ceph base package since the related
ceph-rbdnamer binary is part of this package. Use correct install
pattern.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph.spec.in: remove some twice created directories

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph.spec.in: add installed but not packaged files to ceph-test

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
debian/ceph-test.install: add installed but not packaged files

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge remote-tracking branch 'gh/next'
Merge pull request #198 from dalgaaf/wip-da-spec

Fix some install and rpm SPEC issues

Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
Allow creation of buckets starting with underscore in RGW

Signed-off-by caleb miles <caleb.miles@inktank.com>
rgw: translate object marker to raw format

Fixes: #4600
Object marker should be treated as an object, so that name is formatted
correctly when getting the raw oid.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
librbd: fix DiffIterateStress test

If we write to an interval that didn't previously exist and then discard
it so that it again doesn't exist, all during the same interval, then we
should not include it in the 'written' set (or exists set, obviously).

Similarly, when we got to look at a merged diff, we can ignore extents
that were written (and possibly zeroed) if they neither existed before nor
after.

Bump up the iteration count to get more confidence that this is actually
correct.

Signed-off-by: Sage Weil <sage@inktank.com>
msgr: add second per-message throttler to message policy

We already have a throttler that lets of limit the amount of memory
consumed by messages from a given source.  Currently this is based only
on the size of the message payload.  Add a second throttler that limits
the number of messages so that we can effectively throttle small requests
as well.

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