![]() |
XRootD
|
#include <XrdOucPgrwUtils.hh>
Classes | |
struct | dataInfo |
struct | Layout |
Compute the layout for an iovec that receives network bytes applying. More... | |
Public Member Functions | |
XrdOucPgrwUtils () | |
~XrdOucPgrwUtils () | |
Static Public Member Functions | |
static void | csCalc (const char *data, off_t offs, size_t count, std::vector< uint32_t > &csvec) |
static void | csCalc (const char *data, off_t offs, size_t count, uint32_t *csval) |
static int | csNum (off_t offs, int count) |
Compute the required size of a checksum vector based on offset & length. More... | |
static int | csNum (off_t offs, int count, int &fLen, int &lLen) |
Compute the required size of a checksum vector based on offset & length. More... | |
static bool | csVer (dataInfo &dInfo, off_t &bado, int &badc) |
static int | recvLayout (Layout &layout, off_t offs, int dlen, int bsz=0) |
static int | sendLayout (Layout &layout, off_t offs, int dlen, int bsz=0) |
Definition at line 37 of file XrdOucPgrwUtils.hh.
struct XrdOucPgrwUtils::Layout |
Compute the layout for an iovec that receives network bytes applying.
layout | Reference to the layout parameter (see below). |
offs | recvLayout: Offset at which the subsequent write occurs. sendLayout: Offset at which the preceding read occurs. |
dlen | recvLayout: Nmber of sock bytes to receive with checksums. |
dlen | sendLayout: Nmber of file bytes to read without checksums. |
bsz | The size of the buffer exclusive of any checksums and must be a multiple of 4096 (one page). If it's <= 0 then then the layout is computed as if bsz could fully accomodate the dlen. |
Definition at line 134 of file XrdOucPgrwUtils.hh.
|
inline |
Definition at line 148 of file XrdOucPgrwUtils.hh.
|
inline |
Definition at line 149 of file XrdOucPgrwUtils.hh.
|
static |
Definition at line 77 of file XrdOucPgrwUtils.cc.
References XrdOucCRC::Calc32C(), and csNum().
|
static |
Compute a CRC32C checksums for a pgRead/pgWrite request.
data | Pointer to the data whose checksum it to be computed. |
offs | The offset at which the read or write occurs. |
count | The number of bytes pointed to by data. |
csval | Pointer to a vector to hold individual page checksums. The raw vector must be sized as computed by csNum(). When passed an std::vector, it is done automatically. On return, each element of csval holds the checksum for the associated page. |
Definition at line 54 of file XrdOucPgrwUtils.cc.
References XrdOucCRC::Calc32C().
Referenced by XrdPosixFileRH::HandleResponse(), XrdOucCacheIO::pgRead(), XrdOssDF::pgRead(), XrdPfc::IOFile::pgRead(), XrdOfsFile::pgRead(), XrdSfsFile::pgRead(), XrdPosixExtra::pgWrite(), XrdCl::FileStateHandler::PgWrite(), XrdCl::EcHandler::PgWrite(), and XrdPssFile::pgWrite().
|
static |
Compute the required size of a checksum vector based on offset & length.
offs | The offset at which the read or write occurs. |
count | The number of bytes read or to write. |
Definition at line 109 of file XrdOucPgrwUtils.cc.
Referenced by XrdCl::AsyncPageReader::AsyncPageReader(), XrdCl::XRootDMsgHandler::XRootDMsgHandler(), csCalc(), XrdXrootdAioPgrw::iov4Recv(), XrdXrootdAioPgrw::iov4Send(), XrdPosixExtra::pgWrite(), XrdCl::FileStateHandler::PgWrite(), XrdPssFile::pgWrite(), recvLayout(), sendLayout(), and XrdCl::XRootDMsgHandler::WriteMessageBody().
|
static |
Compute the required size of a checksum vector based on offset & length.
and last segments required in the iov vector.
offs | The offset at which the read or write occurs. |
count | The number of bytes read or to write excluding checksums. |
fLen | The number of bytes needed in iov[0].iov_length |
lLen | The number of bytes needed in iov[csnum-1].iov_length |
Definition at line 129 of file XrdOucPgrwUtils.cc.
|
static |
Definition at line 166 of file XrdOucPgrwUtils.cc.
References XrdOucPgrwUtils::dataInfo::count, XrdOucPgrwUtils::dataInfo::csval, XrdOucPgrwUtils::dataInfo::data, XrdOucPgrwUtils::dataInfo::offs, and XrdOucCRC::Ver32C().
Referenced by XrdOssDF::pgWrite(), XrdPssFile::pgWrite(), and XrdSfsFile::pgWrite().
|
static |
Definition at line 227 of file XrdOucPgrwUtils.cc.
References XrdOucPgrwUtils::Layout::bOffset, csNum(), XrdOucPgrwUtils::Layout::dataLen, XrdOucPgrwUtils::Layout::eWhy, XrdOucPgrwUtils::Layout::fLen, XrdOucPgrwUtils::Layout::lLen, and XrdOucPgrwUtils::Layout::sockLen.
Referenced by XrdXrootdPgwCtl::Setup(), and XrdXrootdAioPgrw::Setup2Recv().
|
static |
Definition at line 310 of file XrdOucPgrwUtils.cc.
References XrdOucPgrwUtils::Layout::bOffset, csNum(), XrdOucPgrwUtils::Layout::dataLen, XrdOucPgrwUtils::Layout::eWhy, XrdOucPgrwUtils::Layout::fLen, XrdOucPgrwUtils::Layout::lLen, and XrdOucPgrwUtils::Layout::sockLen.
Referenced by XrdXrootdAioPgrw::Setup2Send().