From owner-freebsd-fs Sun Jan 12 13: 0:30 2003 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B77FC37B401 for ; Sun, 12 Jan 2003 13:00:29 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EE1843F13 for ; Sun, 12 Jan 2003 13:00:28 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id IAA25769; Mon, 13 Jan 2003 08:00:15 +1100 Date: Mon, 13 Jan 2003 08:00:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: David Schultz Cc: Tomas Pluskal , Terry Lambert , Subject: Re: seeking help to rewrite the msdos filesystem In-Reply-To: <20030112154753.GA3284@HAL9000.homeunix.com> Message-ID: <20030113075546.R8938-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, 12 Jan 2003, David Schultz wrote: > Thus spake Tomas Pluskal : > > I have made a simple patch to enable clustering in msdosfs. > > It is against 4-STABLE. > [...] > > if (ap->a_runp) { > > - /* > > - * Sequential clusters should be counted here. > > - */ > > - *ap->a_runp = 0; > > + int nblk; > > + > > + nblk = (dep->de_FileSize >> bshift) - (lblkno + 1); > > I'm not sure I understand what you're trying to do here. Does > this work with files that are fragmented? You appear to be > assuming that they are not. Maybe you copied the code from the > cd9660 filesystem, which does not permit external fragmentation. ISTR suggesting looking at cd9660 for examples of how to do clustering. Unfortunately, it is too simple here. The corresponding code in ufs and ext2fs is quite complicated. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message