ceph-disk: set guid if reusing a journal partition

When reusing a journal partition (e.g. /dev/sda2) we should set a
new partition guid and link it correctly with the OSD. This way
the journal is symlinked by its persistent name and ceph-disk list
works correctly.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
buffer: implement list::get_contiguous

Return a pointer to a contiguous range of the bufferlist, rebuilding
into a contiguous region as needed.  For now, if we need to rebuild,
we just do the whole thing.  We can obviously optimize this later to
rebuild on the necessary region, but this is good enough for the
(presumably) common case where the needed region is already in fact
contiguous.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2849 from ceph/wip-buffer

RFC: buffer: implement list::get_contiguous

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
doc: Update for OpenStack Juno.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge pull request #2854 from ceph/wip-doc-openstack-juno

doc: Update for OpenStack Juno.

New users working with Nova (Juno) noted that libvirt settings are now under a [libvirt] section, and truncate the leading libvirt_. Made subsections for Havana and Icehouse, added a new subsection for Juno.
doc: Added Key/Value store config reference to index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Edited Key/Value store config reference.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
osd: cache pool: flush object ignoring cache min flush age when cache pool is full
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
Merge pull request #2856 from XinzeChi/master

osd: cache pool: flush object ignoring cache min flush age when cache pool is full

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
rgw: RGWRados::get_obj() returns wrong len if len == 0

Fixes: #9877
We only updated if len was > 0, should update it if r >= 0. This was the
culprit for issue #9877.
Backport: giant, firefly

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
buffer: Add _memcopy_count to track total count of memcopy by rebuild/rebuild_page_aligned/c_str.

Using thie filed, we know the payload of
rebuild/rebuild_page_aligned/c_str and tune performance accroding.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
ObjectStore: Don't use largest_data_off to calc data_align.

If largest_data_off % CEPH_PAGE_SIZE != 0, the get_data_aligment return
a erro value. This make the FileJouranl::align_bl to memcopy much data.

Tested-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
ObjectStore: Fix a error comment.

Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
rgw: S3 object copy content type fix

Fixes: #9478
Backport: firefly, giant
Content type for S3 object copy response should be set to
application/xml.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: send back ETag on S3 object copy

Fixes: #9479
Backport: firefly, giant
We didn't send the etag back correctly. Original code assumed the etag
resided in the attrs, but attrs only contained request attrs.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: remove swift user manifest (DLO) hash calculation

Fixes: #9973
Backport: firefly, giant

Previously we were iterating through the parts, creating hash of the
parts etags (as S3 does for multipart uploads). However, swift just
calculates the etag for the empty manifest object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: update swift subuser perm masks when authenticating

Fixes: #9918
Backport: firefly, giant
It seems that we weren't setting the swift perm mask correctly.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
EC: Allow bench.sh to test ISA backend also

Update bench.sh/plot tool to cover ISA backend.
ISA will output a fake echinique 'cauchy_good' so the plot tool
don't need to be changed.

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
Merge pull request #2868 from zhouyuan/bench_tool_isa

EC: Allow bench.sh to test ISA backend also

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2864 from ceph/wip-9478

rgw: S3 object copy content type fix

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>