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>
crush: return -1 on error from get_type_id

So we can distinguish between a bad type name and type 0.

Fix both callers, too.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: generate useful error msgs for 'osd crush rule create-simple ...'

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: add 'osd crush rule ...' to usage

Signed-off-by: Sage Weil <sage@inktank.com>
mon: allow leveldb logging

'mon leveldb log = filename'

Signed-off-by: Sage Weil <sage@inktank.com>
osd: optionally enable leveldb logging

Signed-off-by: Sage Weil <sage@inktank.com>
rados: add whole-object 'clonedata' command

Clone the data stream from one object to another.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #261 from ceph/wip-leveldb

Reviewed-by: Samuel Just <sam.just@inktank.com>
mon: dump MonitorDBStore transactions to file

Signed-off-by: Samuel Just <sam.just@inktank.com>
ceph-monstore-tool: add MonitorDBStore trace dumper

Signed-off-by: Samuel Just <sam.just@inktank.com>
ceph-monstore-tool: added replay
Merge pull request #254 from ceph/wip-crush-rules

Reviewed-by: Joao Luis <joao.luis@inktank.com>
mon: set MonitorDBStore options on open

So both ctors set the options.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #265 from ceph/wip-mon-trace
Merge pull request #180 from ceph/wip-rados-clone

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
rgw: user operation mask

Fixes: #4716
add user operation mask for controlling user permissions.
Also add admin controls for it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #165 from dachary/wip-4321

unit tests for FileStore::_detect_fs when running on ext4
Merge git://github.com/ceph/ceph