From: Jianpeng Ma Date: Thu, 16 Mar 2017 12:04:08 +0000 (+0800) Subject: os/filestore/FileJournal: change func align_bl to check_align. X-Git-Tag: v12.0.1~24^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=21bb98f619c3cb4297f67f81878dda815c169bfe;p=ceph.git os/filestore/FileJournal: change func align_bl to check_align. In fact, this function only check bufferlist whether size&address aling. It don't do any retune work. So change name to check_align. Signed-off-by: Jianpeng Ma --- diff --git a/src/os/filestore/FileJournal.cc b/src/os/filestore/FileJournal.cc index a5a7290a7a84..74a0031d1ba8 100644 --- a/src/os/filestore/FileJournal.cc +++ b/src/os/filestore/FileJournal.cc @@ -988,7 +988,7 @@ int FileJournal::prepare_single_write(write_item &next_write, bufferlist& bl, of return 0; } -void FileJournal::align_bl(off64_t pos, bufferlist& bl) +void FileJournal::check_align(off64_t pos, bufferlist& bl) { // make sure list segments are page aligned if (directio && !bl.is_aligned_size_and_memory(block_size, CEPH_DIRECTIO_ALIGNMENT)) { @@ -1047,7 +1047,7 @@ void FileJournal::do_write(bufferlist& bl) off64_t pos = write_pos; // Adjust write_pos - align_bl(pos, bl); + check_align(pos, bl); write_pos += bl.length(); if (write_pos >= header.max_size) write_pos = write_pos - header.max_size + get_top(); @@ -1367,7 +1367,7 @@ void FileJournal::do_aio_write(bufferlist& bl) */ int FileJournal::write_aio_bl(off64_t& pos, bufferlist& bl, uint64_t seq) { - align_bl(pos, bl); + check_align(pos, bl); dout(20) << "write_aio_bl " << pos << "~" << bl.length() << " seq " << seq << dendl; diff --git a/src/os/filestore/FileJournal.h b/src/os/filestore/FileJournal.h index 1653cb68eee0..095d4883b17a 100644 --- a/src/os/filestore/FileJournal.h +++ b/src/os/filestore/FileJournal.h @@ -349,7 +349,7 @@ private: int write_aio_bl(off64_t& pos, bufferlist& bl, uint64_t seq); - void align_bl(off64_t pos, bufferlist& bl); + void check_align(off64_t pos, bufferlist& bl); int write_bl(off64_t& pos, bufferlist& bl); /// read len from journal starting at in_pos and wrapping up to len