*BSD News Article 19805


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: a question about the mapsearch() in ufs
Message-ID: <1993Aug21.081939.1986@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University, Ogden, UT
References: <253i4i$be6@acsc.com>
Date: Sat, 21 Aug 93 08:19:39 GMT
Lines: 36

In article <253i4i$be6@acsc.com> jerry@acsc.com (Jerry Chen) writes:
>>>mapsearch() first scans from cg_blksfree(cgp)[n] to the end of
>>>cg_blksfree(cgp)[] then from cg_blksfree(cgp)[0] to cg_blksfree(cgp)[n].
>>>That is, cg_blksfree(cgp)[n] is scanned twice.  Why is this?  Or am I
>>>miss-understanding the code?  Thanks in advance for the advice.
>>
>>It's not scanned twice -- it's scanned from the current rotational location
>>to the end, then from the start of the cylinder to the current location.
>
>Maybe I did not make my question clear.  What I do not understand is:
>
>Why should we scan the current location twice?  
>
>I thought it is enough to scan from the current block to the end of the 
>cylinder group, then from the start of the cylinder group to the 
>(current - 1) block.

It's a simple cheat to cause the next seeked track to be at the rotational
location following the current location so that the next read from the file
won't suffer rotational delay.  For instance, if my track-to-track seek
time is 0, the next track to read is the one immediately following the
current, one track off.  If the seek delay is non-zero, it's calculated in
terms of rotational delay.

The upshot is a sequential read of the file will result in as close to 0
delay because of missed interleave as physically possible.

This is all still predicated on the idea that you know when the physical
seek occurs, so it doesn't help very much for translated drives.


					Terry Lambert
					terry@icarus.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.