From 59f20a1f660b6754a2a5093a6dc50fc00dd542fd Mon Sep 17 00:00:00 2001 From: sage Date: Mon, 2 Jan 2006 23:55:03 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@570 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/ebofs/BlockDevice.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ceph/ebofs/BlockDevice.cc b/ceph/ebofs/BlockDevice.cc index ec9fc0b7fc9dd..dd13957edd1ba 100644 --- a/ceph/ebofs/BlockDevice.cc +++ b/ceph/ebofs/BlockDevice.cc @@ -383,6 +383,9 @@ int BlockDevice::_write(unsigned bno, unsigned num, bufferlist& bl) iov[n].iov_base = i->c_str(); iov[n].iov_len = MIN(left, i->length()); + + assert((((unsigned)iov[n].iov_base) & 4095) == 0); + assert((iov[n].iov_len & 4095) == 0); left -= iov[n].iov_len; n++; @@ -393,8 +396,10 @@ int BlockDevice::_write(unsigned bno, unsigned num, bufferlist& bl) if (r < 0) { dout(1) << "couldn't write bno " << bno << " num " << num - << " (" << num << " bytes) r=" << r + << " (" << len << " bytes) in " << n << " iovs, r=" << r << " errno " << errno << " " << strerror(errno) << endl; + dout(1) << "bl is " << bl << endl; + assert(0); } else { assert(r == (int)len); } -- 2.39.5