Find the next block to be written in the input, and copy it to the output.
(self)
| 186 | return self.read_xored(f, extent.size) |
| 187 | |
| 188 | def copyOneBlock(self): |
| 189 | '''Find the next block to be written in the input, and copy it to the output.''' |
| 190 | extent = self.blockExtents.pop(self.blkCountOut) |
| 191 | if self.blkCountOut in self.outOfOrderData: |
| 192 | # If the data is cached, use it from memory and remove from the cache |
| 193 | rawblock = self.outOfOrderData.pop(self.blkCountOut) |
| 194 | self.outOfOrderSize -= len(rawblock) |
| 195 | else: # Otherwise look up data on disk |
| 196 | rawblock = self.fetchBlock(extent) |
| 197 | |
| 198 | self.writeBlock(extent.inhdr, extent.blkhdr, rawblock) |
| 199 | |
| 200 | def run(self): |
| 201 | while self.blkCountOut < len(self.blkindex): |
no test coverage detected