librados, osd: add flags to COPY_FROM

If we initiate a COPY_FROM as part of a FLUSH operation, we will need to
set a flag so that the read-side of the copy and join the existing
in-progress operation without taknig additional locks.

Similarly, we need to pass flags from the client indicating whether we
should ignore overlay or cache logic while performing the copy.  These are
used by the promote and flush logic.

Note that none of these flags are exposed through librados (at least not
at this time).

Signed-off-by: Sage Weil <sage@inktank.com>
osd: make obc copyfrom blocking generic

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: don't return data within the librados cb

Fixes: #7030
The callback is running within a single Finisher thread, thus we
shouldn't block there. Append read data to a list and flush it within
the iterate context.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix use-after-free when releasing completion handle

Backport: emperor, dumpling
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
rgw workunit to test bucket quota

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
added execute permission to the script

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
include/ceph_features: add CEPH_FEATURES_OSD_ERASURE_CODES

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSD: add binary compat feature for Erasure Codes

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSDMap: check for erasure pools when getting features

If we have a pool with type Erasure, then we consider we require
CEPH_FEATURE_OSD_ERASURE_CODES.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSDMap: add 'features' bit mask field to osd_xinfo_t

And make sure we dump it on osd_xinfo_t::dump().

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: OSDMonitor: handle osd features on boot

Add the osd's features to the osd's extra info field in the OSDMap
so we can track which OSDs are able to deal with Erasure Codes.

This will allow us to decide whether or not we are ready to set EC
whenever the user asks us to set EC on a pool -- which shall be
handled by a subsequent commit.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSD: reflect OSDMap EC flag being set by setting on-disk feature

If OSDMap has the EC feature set, then update our superblock to
reflect as such, making our on-disk format incompatible with previous
OSDs without EC support.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
ceph_osd: add EC to OSD's supported features used by the messenger

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSDMap: add 'get_up_osds()' function

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: OSDMonitor: add optional 'pool type' arg to 'osd pool create'

Allow specifying 'rep', 'raid4' and 'erasure'.
Only allow setting type 'erasure' if all up osds support erasure codes.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
pybind: test_ceph_argparse: test 'ceph osd pool create' with pool type

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunit: cephtool: test osd pool create with erasure type

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
vstart.sh: NOTE, not WARNING, to make gitbuilder happy

Signed-off-by: Sage Weil <sage@inktank.com>
crush/mapper: finish adding choose_local_[fallback_]tries

Didn't finish this in d129e09e57fbc61cfd4f492e3ee77d0750c9d292.

Signed-off-by: Sage Weil <sage@inktank.com>
crush/mapper: attempts -> tries

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