From owner-freebsd-hackers Mon Dec 22 07:59:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA01647 for hackers-outgoing; Mon, 22 Dec 1997 07:59:40 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id HAA01518 for ; Mon, 22 Dec 1997 07:58:50 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: by watermarkgroup.com (4.1/SMI-4.1) id AA11732; Mon, 22 Dec 97 10:54:45 EST Date: Mon, 22 Dec 97 10:54:45 EST From: luoqi@watermarkgroup.com (Luoqi Chen) Message-Id: <9712221554.AA11732@watermarkgroup.com> To: dima@tejblum.dnttm.rssi.ru Subject: Re: msdosfs win95 long file name support Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Actually I looked at NetBSD's code before I started. But its lookup code is somehow not very efficient: directory entry found is stored as directory relative offset, as opposed to file system relative offset as in our code. This results in extra pcbmap() calls in subsequent vnops (this problem is somewhat alleviated by the usage of fat cache, though). Their long file name support is not very well designed too. For instance, if we are to create a file with long file name, we need to find a unique 8.3 name. The logical place is to do that is in the lookup code, where we traverse the whole directory. NetBSD's code instead does that in vnops code, which means that you need to go through the directory TWICE. This is a Bad Thing(TM) if the directory is very large (say, windows/system :) So I decided to modify our existing code, instead merging with NetBSD's code. More efficient code in less time. > Some other differences: > - NetBSD support FAT32 (I haven't tested it) This would be nice to have in our code. I don't know how hard that would be. I remember read in the mailing-list archive, someone said it was a completely different beast than FAT16/12. > - NetBSD support such things as access time of a file. Yes, they support creation/access time. But they didn't try hard to set them correctly. If I've read their code correctly, both creation and access time are always set to equal to the modification time. After all, it is trivial to add support for them. > - NetBSD removed warning "root directory is not a multiple of the clustersize > in length" :-) There's one feature in NetBSD's code I think would be useful. They have a mount option called shortname, which allows you to use the 8.3 name space. I added that to my code last night, this involves changes to sys/mount.h and userland mount program (mount_msdos), and lkm has a different API, it's no longer a drop-in replacement for the old module. So I am not sure if I want to distribute the code now. > > Dima > > > -lq