Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Sep 1998 00:28:19 -0700
From:      Mike Smith <mike@smith.net.au>
To:        zhihuizhang <bf20761@binghamton.edu>
Cc:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: Simple questions on ffs_blkpref() and cluster_save 
Message-ID:  <199809080728.AAA15515@word.smith.net.au>
In-Reply-To: Your message of "Mon, 07 Sep 1998 14:19:25 EDT." <Pine.SOL.L3.93.980907141223.20839A-100000@bingsun2> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Can anyone tell me the meaning of the two parameters indx and bap of the
> routine ffs_blkpref() in ffs_alloc.c?
> 
> Trying to figure out the two parameters myself, I look for call instances
> of ffs_blkpref(). It is called by ffs_reallocblks(). However, I can not
> find where the structure cluster_save is defined.
> 
> My intention is to figure out the meaning of indx/bap by looking at how
> ffs_reallocblks() set these two parameters.  But I am stuck by the
> cluster_save.

indx refers to the offset of the allocation within the file section.

bap[] is the table of block addresses within the section.  It's used to 
locate the previous block in the file in order to make a contiguous 
allocation.

The comment at the top of ffs_blkpref() is a little opaque, but does 
seem to clarify this.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809080728.AAA15515>