Skip to content

Commit

Permalink
Include file offset (hdfs healing mode).
Browse files Browse the repository at this point in the history
  • Loading branch information
alja authored and abh3 committed Jun 30, 2016
1 parent 77a49d4 commit 162763f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XrdFileCache/XrdFileCacheVRead.cc
Expand Up @@ -178,7 +178,7 @@ bool File::VReadPreProcess(const XrdOucIOVec *readV, int n, ReadVBlockListRAM& b
inc_ref_count(bi->second);
clLog()->Debug(XrdCl::AppMsg, "VReadPreProcess block %d in map", block_idx);
}
else if (m_cfi.TestBit(block_idx))
else if (m_cfi.TestBit(offsetIdx(block_idx)))
{
blocks_on_disk.AddEntry(block_idx, iov_idx);
clLog()->Debug(XrdCl::AppMsg, "VReadPreProcess block %d , chunk idx = %d on disk", block_idx,iov_idx );
Expand Down Expand Up @@ -229,7 +229,7 @@ int File::VReadFromDisk(const XrdOucIOVec *readV, int n, ReadVBlockListDisk& blo
clLog()->Debug(XrdCl::AppMsg, "VReadFromDisk block=%d chunk=%d", blockIdx, chunkIdx);
overlap(blockIdx, m_cfi.GetBufferSize(), readV[chunkIdx].offset, readV[chunkIdx].size, off, blk_off, size);

int rs = m_output->Read(readV[chunkIdx].data + off, blockIdx*m_cfi.GetBufferSize() + blk_off, size);
int rs = m_output->Read(readV[chunkIdx].data + off, blockIdx*m_cfi.GetBufferSize() + blk_off - m_offset, size);
if (rs >=0 ) {
bytes_read += rs;
}
Expand Down

0 comments on commit 162763f

Please sign in to comment.