⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 layout_g1_zone.modspec

📁 目前最精确的磁盘模拟器的第3版
💻 MODSPEC
字号:
# diskmodel (version 1.0)# Authors: John Bucy, Greg Ganger# Contributors: John Griffin, Jiri Schindler, Steve Schlosser## Copyright (c) of Carnegie Mellon University, 2001, 2002, 2003.## This software is being provided by the copyright holders under the# following license. By obtaining, using and/or copying this# software, you agree that you have read, understood, and will comply# with the following terms and conditions:## Permission to reproduce, use, and prepare derivative works of this# software is granted provided the copyright and "No Warranty"# statements are included with all reproductions and derivative works# and associated documentation. This software may also be# redistributed without charge provided that the copyright and "No# Warranty" statements are included in all redistributions.## NO WARRANTY. THIS SOFTWARE IS FURNISHED ON AN "AS IS" BASIS.# CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER# EXPRESSED OR IMPLIED AS TO THE MATTER INCLUDING, BUT NOT LIMITED# TO: WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY# OF RESULTS OR RESULTS OBTAINED FROM USE OF THIS SOFTWARE. CARNEGIE# MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH# RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT# INFRINGEMENT.  COPYRIGHT HOLDERS WILL BEAR NO LIABILITY FOR ANY USE# OF THIS SOFTWARE OR DOCUMENTATION.   MODULE layout_g1_zonePROTO int dm_layout_g1_zone_loadparams(struct lp_block *b);PARAM First cylinder number		I	1 TEST i >= 0INIT result->startcyl = i;This specifies the first physical cylinder in the zone.PARAM Last cylinder number		I	1  TEST i >= 0INIT result->endcyl = i;This specifies the last physical cylinder in the zone.PARAM Blocks per track			I	1  TEST i > 0INIT result->blkspertrack = i;INIT result->sector_width = ((long long)1 << 32) / result->blkspertrack;This specifies the number of sectors (independent of logical-to-physicalmappings) on each physical track in the zone.PARAM Offset of first block		D	1 DEPEND Blocks per track# DEPEND Skew unitsINIT {INIT   skew_unit_t skewtmp = NONE;INIT   if(skew_units != NONE) skewtmp = skew_units;INIT   else if(layout_skew_units != NONE) skewtmp = layout_skew_units;INIT   switch(skewtmp) {INIT   case REVOLUTIONS:INIT     result->firstblkangle = dm_angle_dtoi(d);INIT     break;INIT   case NONE:INIT   case SECTORS:INIT   default:INIT     result->firstblkangle = (int)d * result->sector_width;INIT     break;INIT   }INIT }This specifies the physical offset of the first logical sector in thezone.  Physical sector 0 of every track is assumed to begin at thesame angle of rotation.  This may be in either sectors or revolutionsaccording to the ``Skew units'' parameter.PARAM Skew units			S	0 INIT if(!strcmp(s, "revolutions")) { skew_units = REVOLUTIONS; } INIT else if(!strcmp(s, "sectors")) { skew_units = SECTORS; }INIT else { ddbg_assert(0); }Default is \texttt{sectors}.  This value overrides any set in thesurrounding layout block.PARAM Empty space at zone front		I	1 INIT result->deadspace = i;This specifies the size of the ``management area'' allocated at thebeginning of the zone for internal data structures.  This area can notbe accessed during normal activity and is not part of the disk'slogical-to-physical mapping.PARAM Skew for track switch		D	0 DEPEND Blocks per trackINIT {INIT   skew_unit_t skewtmp = NONE;INIT   if(skew_units != NONE) skewtmp = skew_units;INIT   else if(layout_skew_units != NONE) skewtmp = layout_skew_units;INIT   switch(skewtmp) {INIT   case REVOLUTIONS:INIT     result->trackskew = dm_angle_dtoi(d);INIT     break;INIT   case NONE:INIT   case SECTORS:INIT   default:INIT     result->trackskew = (int)d * result->sector_width;INIT     break;INIT   }INIT }This specifies the number of physical sectors that are skipped whenassigning logical block numbers to physical sectors at a trackcrossing point.  Track skew is computed by the manufacturer tooptimize sequential access. This may be in either sectors orrevolutions according to the ``Skew units'' parameter. PARAM Skew for cylinder switch		D	0 DEPEND Blocks per trackINIT {INIT   skew_unit_t skewtmp = NONE;INIT   if(skew_units != NONE) skewtmp = skew_units;INIT   else if(layout_skew_units != NONE) skewtmp = layout_skew_units;INIT   switch(skewtmp) {INIT   case REVOLUTIONS:INIT     result->cylskew = dm_angle_dtoi(d);INIT     break;INIT   case NONE:INIT   case SECTORS:INIT   default:INIT     result->cylskew = (int)d * result->sector_width;INIT     break;INIT   }INIT }This specifies the number of physical sectors that are skipped whenassigning logical block numbers to physical sectors at a cylindercrossing point.  Cylinder skew is computed by the manufacturer tooptimize sequential access. This may be in either sectors orrevolutions according to the ``Skew units'' parameter.PARAM Number of spares			I	1 INIT result->sparecnt = i;This specifies the number of spare storage locations -- sectors or tracks,depending on the sparing scheme chosen -- allocated per region ofcoverage which may be a track, cylinder, or zone, depending on thesparing scheme.  For example, if the sparing scheme is 1, indicatingthat spare tracks are allocated at the end of the zone, the value ofthis parameter indicates how many spare tracks have been allocated forthis zone.# SLIPBLOCK contains NUM values PARAM slips				LIST	1 TEST !getslips(result, l)This is a list of lbns for previously detected defective medialocations -- sectors or tracks, depending upon the sparing schemechosen -- that were skipped-over or ``slipped'' when thelogical-to-physical mapping was last created.  Each integer in thelist indicates the slipped (defective) location.# DEFECTBLOCK contains NUM values interpreted as (logphy) pairsPARAM defects				LIST	1 TEST !getdefects(result, l)This list describes previously detected defective medialocations -- sectors or tracks, depending upon the sparing schemechosen -- that have been remapped to alternate physical locations.The elements of the list are interpreted as pairs wherein the firstnumber is the original (defective) location and the second numberindicates the replacement location.  Note that these locationswill both be either a physical sector number or a physical tracknumber, depending on the sparing scheme chosen.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -