Method:
The program will attempt to identify scratches on each media surface based on the following criteria:
Adjacent flaws can not be on the same cylinder.
The radial distance between two adjacent flaws is less than or equal to TRK_SPACING measured in cylinders.
The positional distance, in bytes, between two adjacent flaws is less than or equal to BYTE_WINDOW.
For each scratch found, a filling process will take place:
All cylinders between adjacent pairs of flaws will have a flaw map entry added with a position calculated from the previous flaw's position and the following entry's flaw position on the same scratch. (angular fill)
The scratch will be extended by tracks on both ends by the parameters set in TAIL_SIZES. Flaw positions of these entries will be calculated with angularity. The first parameter in TAIL_SIZES sets the tail size for a two track length scratch. The second parameter, sets the tail size for a three track length scratch. The third parameter, sets the tail size for a four to seven track length scratch. The fourth parameter sets the tail size for an eight or higher track length scratch.
If SECTORS_TO_CHK is specified, circumferential scratch fill will be performed. This option will search for defects on the same track. If the defects are within the number of sectors specified in SECTORS_TO_CHK, then all the sectors in between plus the number of forward pad sectors specified in PAD_SIZE, are flagged. These defects will be added to the defect list. This is done after angular scratch fill is complete.
If SERVO_TAIL_SIZE is specified, Servo flaws within a 6 track window will be filled and tailed. Servo fill is performed after a successful angular scratch fill.
If LARGE_FLAW_LEN is specified, single track defects that do not already belong to a scratch, and have a flaw length that is greater than or equal to LARGE_FLAW_LEN, will be tailed by one.
If FILL_BACK_SIZE is specified, a scratch larger than twice the eight track tail size plus six, will have it's length adjusted.
The ETF MAP is used as both source and destination of this process.
The maximum number of flaws added will be the total number of defects up to but not exceeding MAX_TOTAL_FLAWS or the max that the ETF MAP can handle.