![]() |
XRootD
|
Implements a non-async read and write to ceph via aio ceph_posix calls Using the standard ceph_posix_aio calls do the actual read and write operations. No ownership is taken on the buffer that's passed via the constructor Although using aio calls, we block here until the data has been read/written. More...
#include <CephIOAdapterAIORaw.hh>
Public Member Functions | |
CephIOAdapterAIORaw (IXrdCephBufferData *bufferdata, int fd) | |
virtual | ~CephIOAdapterAIORaw () |
virtual ssize_t | read (off64_t offset, size_t count) override |
Issue a ceph_posix_pread to read to the buffer data from file offset and len count. No range checking is currently provided here. The caller must provide sufficient space for the max len read. Returns -ve errorcode on failure, else the number of bytes returned. More... | |
virtual ssize_t | write (off64_t offset, size_t count) override |
Take the data in the buffer and write to ceph at given offset Issues a ceph_posix_pwrite for data in the buffer (from pos 0) into ceph at position offset with len count. Returns -ve on error, else the number of bytes writen. More... | |
![]() | |
virtual | ~ICephIOAdapter () |
Implements a non-async read and write to ceph via aio ceph_posix calls Using the standard ceph_posix_aio calls do the actual read and write operations. No ownership is taken on the buffer that's passed via the constructor Although using aio calls, we block here until the data has been read/written.
Definition at line 59 of file CephIOAdapterAIORaw.hh.
CephIOAdapterAIORaw::CephIOAdapterAIORaw | ( | IXrdCephBufferData * | bufferdata, |
int | fd | ||
) |
Definition at line 54 of file CephIOAdapterAIORaw.cc.
|
virtual |
|
overridevirtual |
Issue a ceph_posix_pread to read to the buffer data from file offset and len count. No range checking is currently provided here. The caller must provide sufficient space for the max len read. Returns -ve errorcode on failure, else the number of bytes returned.
offset | |
count |
Implements XrdCephBuffer::ICephIOAdapter.
Definition at line 127 of file CephIOAdapterAIORaw.cc.
References aiocb::aio_buf, aiocb::aio_nbytes, aiocb::aio_offset, aioReadCallback(), BUFLOG, ceph_aio_read(), XrdCephBuffer::CephBufSfsAio::isDone(), XrdCephBuffer::CephBufSfsAio::m_condVar, XrdCephBuffer::CephBufSfsAio::m_lock, XrdCephBuffer::IXrdCephBufferData::raw(), XrdSfsAio::Result, XrdCephBuffer::IXrdCephBufferData::setLength(), XrdCephBuffer::IXrdCephBufferData::setStartingOffset(), and XrdCephBuffer::IXrdCephBufferData::setValid().
|
overridevirtual |
Take the data in the buffer and write to ceph at given offset Issues a ceph_posix_pwrite for data in the buffer (from pos 0) into ceph at position offset with len count. Returns -ve on error, else the number of bytes writen.
offset | |
count |
Implements XrdCephBuffer::ICephIOAdapter.
Definition at line 77 of file CephIOAdapterAIORaw.cc.
References aiocb::aio_buf, aiocb::aio_nbytes, aiocb::aio_offset, aioWriteCallback(), BUFLOG, ceph_aio_write(), XrdCephBuffer::CephBufSfsAio::isDone(), XrdCephBuffer::CephBufSfsAio::m_condVar, XrdCephBuffer::CephBufSfsAio::m_lock, XrdCephBuffer::IXrdCephBufferData::raw(), and XrdSfsAio::Result.