Skip to content
Snippets Groups Projects
Commit ee211b54 authored by Steven Murray's avatar Steven Murray
Browse files

Made 1st readBlock of Read/Write sessions "exact"

Both tapeFile::ReadSession and tapeFile::WriteSession start by
reading VOL1 by calling Drive::readBlock() with a block of 84
bytes even though Logical Block Protection (LBP) is turned off
at this early stage of a session.  With LBP turned off, a drive
will only return the exact record being read and wil not add 4
CRC bytes at the end.  This means the drive will always return
80 bytes.

Both tapeFile::ReadSession and tapeFile::WriteSessioas called
Drive::readBlock() with a block of 84 bytes in order to work
with an "in-house" version of mhvtl that tried to support LBP.
Unfortunately the behaviour of this special version of mhvtl
was incorrect because it would 84 bytes when LBP was disabled.

The "in-house" version of mhvtl trying to support LBP is no
longer used with CASTOR.  This commit therefore simplfies the
CASTOR code by replacing Drive::readBlock() with
Drive::readExactBlock and by removing the conditional logic
that dealt with the existance of an 84 byte VOL1 label in the
presence of the "in-house" version of mhvtl.
parent 29ca9f8d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment