Skip to content

Commit

Permalink
[XrdCl] Include all chunk details in kXR_readv descripsion.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal authored and gganis committed Nov 23, 2021
1 parent 4167a10 commit 710df54
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/XrdCl/XrdClXRootDTransport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2939,23 +2939,24 @@ namespace XrdCl
unsigned char *fhandle = 0;
o << "kXR_readv (";

readahead_list *dataChunk = (readahead_list*)(msg + 24 );
uint64_t size = 0;
uint32_t numChunks = 0;
for( size_t i = 0; i < req->dlen/sizeof(readahead_list); ++i )
{
fhandle = dataChunk[i].fhandle;
size += dataChunk[i].rlen;
++numChunks;
}
o << "handle: ";
readahead_list *dataChunk = (readahead_list*)(msg + 24 );
fhandle = dataChunk[0].fhandle;
if( fhandle )
o << FileHandleToStr( fhandle );
else
o << "unknown";
o << ", ";
o << std::setbase(10);
o << "chunks: " << numChunks << ", ";
o << "chunks: [";
uint64_t size = 0;
for( size_t i = 0; i < req->dlen/sizeof(readahead_list); ++i )
{
size += dataChunk[i].rlen;
o << "(offset: " << dataChunk[i].offset;
o << ", size: " << dataChunk[i].rlen << "); ";
}
o << "], ";
o << "total size: " << size << ")";
break;
}
Expand Down

0 comments on commit 710df54

Please sign in to comment.