Merge pull request #2531 from dachary/wip-9536-isa-alignment

erasure-code: isa plugin alignment fixes

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2524 from ceph/wip-5768

rbd-fuse: Fix memory leak in enumerate_images

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
os: io_event.res is the size written

And not an error code to be converted with cpp_strerror()

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2575 from ceph/wip-zafman-cleanup

osd: Remove unused PG functions queue_notify(), queue_info(), queue_log(...

Reviewed-by: Loic Dachary <loic@dachary.org>
Merge pull request #2572 from ceph/wip-9562

osdc/Filer: drop probe/purge locks before calling objecter

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Yan, Zheng <ukernel@gmail.com>
ceph-disk: add Scientific Linux as a Redhat clone

Scientific Linux is a RHEL clone and needs to use partx.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Crush: Ensuring at most num-rep osds are selected

Crush temporary buffers are allocated as per replica size configured
by the user.When there are more final osds (to be selected as per
rule) than the replicas, buffer overlaps and it causes crash.Now, it
ensures that at most num-rep osds are selected even if more number of
osds are allowed by the rule.

Fixes: #9492

Signed-off-by: Johnu George <johnugeo@cisco.com>
Merge pull request #2568 from johnugeorge/wip-9492-crush

Crush: Ensuring at most num-rep osds are selected for any rule

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
ceph-disk: add Scientific Linux as a Redhat clone

Scientific Linux is a RHEL clone and needs to use partx.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit 5ca7ea5b531f28b3c87161d53aee907d6957cfc2)
Merge pull request #2580 from cernceph/wip-scientific

ceph-disk: add Scientific Linux as a Redhat clone

Reviewed-by: Sage Weil <sage@redhat.com>
librados: cap the rados*{write,append} buffer length

When the caller submits a payload that will end up being rejected with

  rados.Error: Ioctx.write(rbd): failed to write hw: errno EMSGSIZE

it is stored in a bufferlist whose length is an unsigned int. If the
value of the len parameter is greater than UINT_MAX/2, rados_write,
rados_write_full and rados_append will fail with E2BIG.

Multiple calls to rados_write or rados_append can fill objects larger
than UINT_MAX/2.

http://tracker.ceph.com/issues/9592 Fixes: #9592

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2584 from dachary/wip-9592-librados-large-object

librados: cap the rados*{write,append} buffer length

Reviewed-by: Sage Weil <sage@redhat.com>
crushtool: add --show-location <id> command

Include some tests.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: Make RPGTransaction::get_bytes_written return the correct size.

It record size larger than clien wrote. It should like
ECTransaction::get_bytes_written only return the size which clien
wrote. It should contain omap data.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
librados: cap the rados_aio_*{write,append} buffer length

If the value of the len parameter is greater than UINT_MAX/2,
rados_aio_write, rados_aio_write_full and rados_aio_append will fail
with E2BIG.

For more information see 33501d242661a545211df43bf645398b492398ae

http://tracker.ceph.com/issues/9592 Fixes: #9592

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
librados: test s/E2BIG/TooBig/

Because E2BIG does not allow selection

./ceph_test_rados_api_aio --gtest_filter=LibRadosAio.E2BIG
Running main() from gtest_main.cc
Note: Google Test filter = LibRadosAio.E2BIG
[==========] Running 0 tests from 0 test cases.
[==========] 0 tests from 0 test cases ran. (0 ms total)
[  PASSED  ] 0 tests.

probably because it contains a number.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Clock: Using clock_gettime instead of gettimeofday in linux os.

The precision of utime_t is nsec. In func ceph_clock_now, it use
gettimeofday to set utime_t. But the precision of gettimeofday is
microseconds. In linux, the precision of clock_gettime is nsec.
So using clock_gettime install gettimeofday in order to get higer
precision.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Merge pull request #2400 from majianpeng/fix2

osd: Make RPGTransaction::get_bytes_written return the correct size.

Reviewed-by: Sage Weil <sage@redhat.com>
os/FileStore: using FIEMAP_FLAGS_SYNC instead of fsync() before call
fiemap.

When call fiemap, it need sync the file. Now it used fsync() to achieve
this. But for fiemap, there is a flag FIEMAP_FLAGS_SYNC which do the
same thing like fsync().

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
librados: cap the IoCtxImpl::{aio_}*{write,append} buffer length

If the value of the len parameter is greater than UINT_MAX/2,
IoCtxImpl::aio_write, IoCtxImpl::aio_write_full, IoCtxImpl::aio_append,
IoCtxImpl::write, IoCtxImpl::append will fail with E2BIG.

IoCtxImpl::write_full is the exception because it does not have a
length argument to check.

For more information see 33501d242661a545211df43bf645398b492398ae

http://tracker.ceph.com/issues/9592 Fixes: #9592

Signed-off-by: Loic Dachary <loic-201408@dachary.org>