diff --git a/src/XrdOss/XrdOss.cc b/src/XrdOss/XrdOss.cc index 79d4743f6c5..80b650035e4 100644 --- a/src/XrdOss/XrdOss.cc +++ b/src/XrdOss/XrdOss.cc @@ -172,7 +172,7 @@ ssize_t XrdOssDF::pgRead(void *buffer, // Calculate checksums if so wanted // if (bytes > 0 && csvec) - XrdOucPgrwUtils::csCalc((const char *)buffer, offset, rdlen, csvec); + XrdOucPgrwUtils::csCalc((const char *)buffer, offset, bytes, csvec); // All done // diff --git a/src/XrdOuc/XrdOucCache.cc b/src/XrdOuc/XrdOucCache.cc index a72b242e461..2a38f4664d6 100644 --- a/src/XrdOuc/XrdOucCache.cc +++ b/src/XrdOuc/XrdOucCache.cc @@ -44,12 +44,6 @@ int XrdOucCacheIO::pgRead(char *buff, { int bytes; -// Make sure the offset is on a 4K boundary and the size is a multiple of -// 4k as well (we use simple and for this). -// - if ((offs & XrdSys::PageMask) - || (rdlen & XrdSys::PageMask)) return -EINVAL; - // Read the data into the buffer // bytes = Read(buff, offs, rdlen); @@ -58,7 +52,7 @@ int XrdOucCacheIO::pgRead(char *buff, // if (bytes > 0 && (opts & forceCS)) XrdOucPgrwUtils::csCalc((const char *)buff, (ssize_t)offs, - (size_t)rdlen, csvec); + (size_t)bytes, csvec); // All done //