CAC 2015-10-06

This page is obsolete and archived!


Looking into MFS record addressing issues…

          block_len = ceil (ceil (rec_len / 4) / sect_size) * sect_size;

          count_limit_fixed = ceil (block_len / sect_size); /* and sector  count limit  in seek data */

           next_key = current_key + sectors_for_record;

           sectors_for_record = ceil (rec_len / (4 * sect_size));

//key appears to be in sectors.

BUILD_NORMAL_SEEK:
          idcw.command = seek_command (dev_type);
          unspec (seek) = "0"b;
          seek.block_count_limit = count_limit_fixed;
          seek.ti = track_indicators;
          if is_sv
               then do;                                     /* convert the key to real sector */
                    sector_offset = mod (key, sect_per_cyl (dev_type));
                    seek.sector =
                         ((key - sector_offset) * number_of_sv (dev_type)) + (sv_num * sect_per_cyl (dev_type))
                         + sector_offset;
               end;
               else seek.sector = key;
          unspec (seek_data) = unspec (seek);
          goto SEEK_BUILT;

sector_offset is the number of sectors from the start of the cylinder.
key - sector_offset is the number of first sector of the cylinder.

Aghh. they interleave the cylinders...
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License