For erasure code pool, set max_size to N*stripe_width when
doing copy-get, to avoid extra read.
Fixes: http://tracker.ceph.com/issues/21756
Signed-off-by: huangjun <huangjun@xsky.com>
if (!cop->temp_cursor.data_complete) {
assert(cop->data.length() + cop->temp_cursor.data_offset ==
cop->cursor.data_offset);
- if (pool.info.requires_aligned_append() &&
+ if (pool.info.required_alignment() &&
!cop->cursor.data_complete) {
/**
* Trim off the unaligned bit at the end, we'll adjust cursor.data_offset
void _write_copy_chunk(CopyOpRef cop, PGTransaction *t);
uint64_t get_copy_chunk_size() const {
uint64_t size = cct->_conf->osd_copyfrom_max_chunk;
- if (pool.info.requires_aligned_append()) {
+ if (pool.info.required_alignment()) {
uint64_t alignment = pool.info.required_alignment();
if (size % alignment) {
size += alignment - (size % alignment);