mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
filejournal: fix buffer realignment condition; useful debug output on error
We don't care about contiguous, only about page alignment.
This commit is contained in:
parent
134a0d0f72
commit
2f9ea76fba
@ -498,9 +498,13 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64
|
||||
|
||||
void FileJournal::write_bl(off64_t& pos, bufferlist& bl)
|
||||
{
|
||||
// make sure this is a single, contiguous buffer
|
||||
if (directio && !bl.is_contiguous()) {
|
||||
// make sure list segments are page aligned
|
||||
if (directio && (!bl.is_page_aligned() ||
|
||||
!bl.is_n_page_sized())) {
|
||||
bl.rebuild_page_aligned();
|
||||
if ((bl.length() & ~PAGE_MASK) != 0 ||
|
||||
(pos & ~PAGE_MASK) != 0)
|
||||
dout(0) << "rebuild_page_aligned failed, " << bl << dendl;
|
||||
assert((bl.length() & ~PAGE_MASK) == 0);
|
||||
assert((pos & ~PAGE_MASK) == 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user