]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: don't check overwrite flag when handling copy-get 18241/head
authorhuangjun <huangjun@xsky.com>
Wed, 11 Oct 2017 09:29:46 +0000 (17:29 +0800)
committerhuangjun <huangjun@xsky.com>
Wed, 11 Oct 2017 09:29:46 +0000 (17:29 +0800)
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>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index efdd53e017dbfd05e40631aa23c1f9a2eb40c4a0..8f7de0f1d166aae33930e647e88480f535a8a363 100644 (file)
@@ -8020,7 +8020,7 @@ void PrimaryLogPG::_write_copy_chunk(CopyOpRef cop, PGTransaction *t)
   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
index 3e9de77ef7671cd2fd7c7f913298354ec044f4fb..559c5477c03e2e78551b5e7d05d03a845a25387b 100644 (file)
@@ -1269,7 +1269,7 @@ protected:
   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);