Bug #9073 » journal.diff
src/os/FileJournal.cc | ||
---|---|---|
bp.zero();
|
||
int r = ::pread(fd, bp.c_str(), bp.length(), 0);
|
||
bl.push_back(bp);
|
||
|
||
unsigned int *p = (unsigned int *)bp.c_str();
|
||
dout(10) << __func__ << "count=0x" << std::hex << p[0] << " ,0x=" << std::hex << p[1] << dendl;
|
||
try {
|
||
bufferlist::iterator p = bl.begin();
|
||
... | ... | |
bufferptr bp = buffer::create_page_aligned(get_top());
|
||
bp.zero();
|
||
memcpy(bp.c_str(), bl.c_str(), bl.length());
|
||
unsigned int *p = (unsigned int *)bp.c_str();
|
||
dout(10) << __func__ << " ptr= " << std::hex << p << dendl;
|
||
dout(10) << __func__ << " content=0x" << std::hex << p[0] << " ,0x=" << std::hex << p[1] << dendl;
|
||
return bp;
|
||
}
|
||
... | ... | |
iov[n].iov_base = (void *)p->c_str();
|
||
iov[n].iov_len = p->length();
|
||
len += p->length();
|
||
unsigned int *p1 = (unsigned int *)p->c_str();
|
||
dout(10) << __func__ << " ptr= " << std::hex << p1 << dendl;
|
||
dout(10) << __func__ << " content=0x" << std::hex << p1[0] << " ,0x=" << std::hex << p1[1] << dendl;
|
||
}
|
||
bufferlist tbl;
|
||
... | ... | |
iocb *piocb = &aio.iocb;
|
||
int attempts = 10;
|
||
do {
|
||
unsigned int *p = (unsigned int *)iov[0].iov_base;
|
||
dout(10) << __func__ << " ptr= " << std::hex << p << dendl;
|
||
dout(10) << __func__ << " content=0x" << std::hex << p[0] << " ,0x=" << std::hex << p[1] << dendl;
|
||
int r = io_submit(aio_ctx, 1, &piocb);
|
||
if (r < 0) {
|
||
derr << "io_submit to " << aio.off << "~" << aio.len
|
||
... | ... | |
dout(10) << "write_finish_thread_entry aio " << ai->off
|
||
<< "~" << ai->len << " done" << dendl;
|
||
ai->done = true;
|
||
unsigned int *p = (unsigned int *)ai->iov[0].iov_base;
|
||
dout(10) << __func__ << " ptr= " << std::hex << p << dendl;
|
||
dout(10) << __func__ << " content=0x" << std::hex << p[0] << " ,0x=" << std::hex << p[1] << dendl;
|
||
}
|
||
check_aio_completion();
|
||
}
|