From owner-freebsd-hackers Tue Sep 8 00:22:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA15128 for freebsd-hackers-outgoing; Tue, 8 Sep 1998 00:22:13 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from word.smith.net.au (castles249.castles.com [208.214.165.249]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA15122 for ; Tue, 8 Sep 1998 00:22:10 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (LOCALHOST [127.0.0.1]) by word.smith.net.au (8.9.1/8.8.8) with ESMTP id AAA15515; Tue, 8 Sep 1998 00:28:20 -0700 (PDT) (envelope-from mike@word.smith.net.au) Message-Id: <199809080728.AAA15515@word.smith.net.au> X-Mailer: exmh version 2.0.2 2/24/98 To: zhihuizhang cc: hackers Subject: Re: Simple questions on ffs_blkpref() and cluster_save In-reply-to: Your message of "Mon, 07 Sep 1998 14:19:25 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 08 Sep 1998 00:28:19 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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