Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 1998 15:15:07 -0400 (EDT)
From:      zhihuizhang <bf20761@binghamton.edu>
To:        Mike Smith <mike@smith.net.au>
Cc:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: ffs_blkpref() and cluster_save 
Message-ID:  <Pine.SOL.L3.93.980908115840.8527B-100000@bingsun1>
In-Reply-To: <199809080728.AAA15515@word.smith.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 8 Sep 1998, Mike Smith wrote:

> 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.

I am still confused with this small routine: 

(1) If bap[indx-1]==0 means the previous logical block has not been
allocated, does this imply that the file has holes?  In this case, we can
not make use of information of previous allocation.  Since this also
implies that we are NOT making contiguous allocation, it is OK to guess 
by logical block number.

(2) bap is actually given as ip->i_db[0] or the last metablock on the path
used to access the data block (see ufs_getlbns()) and indx is the offset
into bap corresponding to the given logical block number. Its value should
be 0..11 or 0..1023.  If so, indx has nothing to do with fs_maxbpg.  I
mean indx % fs->fs_maxbpg is the same thing as indx == 0. The default
value of maxbpg is 1024 though.

(3) Why we always return the same value fs_fpg*cg + fs_frag for ALL direct
blocks (lbn < NDADDR)?  Besides, the first fragment address of a chosen
cylinder group cg should be fs_fpg * cg, not fs_fpg*cg + fs_frag. 

By the way, I still can not find where the structure *cluster_save* is
defined (I check all the included head files). I hope someone can tell me
where it is.

Any help is appreciated.


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?Pine.SOL.L3.93.980908115840.8527B-100000>