[Stgt-devel] Dealing with filemarks in SSC ...
Thu Jul 31 00:53:21 CEST 2008
On Wed, Jul 30, 2008 at 3:08 PM, Mark Harvey <markh794 at gmail.com> wrote:
[a bunch of very good questions ...]
The model I am using for the moment is that setmarks and filemarks are
kept in a separate array.
The tape object/LU keeps track of where it is in logical tape space
(byte offset seems good).
When you write a filemark or a setmark, add an entry to and array with
the byte offset into the tape.
When you init the tape or rewind, set variable next_mark to 0.
When you do a read or any positioning command you:
1. Check if the length + current offset > offset for next_mark. If so,
adjust the length to read down and set up a CHECK_CONDITION, NO_SENSE,
FILEMARK DETECTED or whatever.
2. Do the read or positioning command.
3. Update the logical position by the amount of logical data moved.
With respect to compression etc, this would be handled by using
container objects (compressed blocks or whatever) indexed by block num
or something. Perhaps a bit more complex than that. Would probably
compress the natural blocks given to us by the application, eg 64kB
blocks, so would need to decompress those.
This is all evolving as I see what tools I can use to test the changes
I am making.
The bacula btest program is useful, but it seems to require variable
blocks sizes at some point.
More information about the stgt