Date: 29 Mar 2001 12:49:15 -0500 From: Randell Jesup <rjesup@wgate.com> To: Terry Lambert <tlambert@primenet.com> Cc: jar@integratus.com (Jack Rusher), freebsd-arch@FreeBSD.ORG (freebsd-arch@FreeBSD.ORG) Subject: Re: configuration files Message-ID: <ybupuf0ihyc.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> In-Reply-To: Terry Lambert's message of "Wed, 28 Mar 2001 21:51:30 %2B0000 (GMT)" References: <200103282151.OAA12651@usr02.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert <tlambert@primenet.com> writes: >> I have always wondered whether it would be worth my while to create a >> VMS style versioning file system (everyone who remembers DEL *.*;* raise >> your hand) to hold configuration files. It seems like a natural >> mechanism for this (although they didn't use it for that in VMS). > >VMS versioning really depends on doing globbing in the kernel >instead of in user space. > >Despite the fact that globbing in the kernel makes it so you >can pass back only the data matching your search criterian, >instead of all the data available, after which you iterate >through it again in user space, UNIX people really, really >tend to hate kernel globbing as a concept. Full globbing in the _kernel_ isn't necessary (though I like it, for a bunch of reasons I'll throw in as a postscript). It does require that the default version of readdir() return only the most recent, and a load of other changes (of course). Much of this can be in user-space in libraries, though. The suggestion above seemed to be a slight variation on the normal VMS idea, in that it was only mentioned for use with configuration files. I.e. no (or few) userland changes, but weird FS semantics (open(), write(), close() on an existing file causes the old file(s) to be renamed - foo.cfg becomes foo.cfg.1, .1 becomes .2, etc). This wouldn't be used to replace UFS/etc, just for config files. (We did something a little similar on the Amiga at one point; we implemented file-change-notification on the RAMdisk only, and at boot copied all config files to the ramdisk (actually ENV:) from permanent storage (ENVARC:). You could reassign ENV: to be on a disk which didn't support notification; you just lost the benefits of live notification.) >Without kernel globbing, you have to split up the namespace, and >hack both the FS (namespace folding) and the user land tools >(display versioning data from a seperate metadata request as a >result of being given an option to do so). The result is that >everything except special tools only see the most recent version >of a file. It ends up being really, really hackish, to the point >of not being worth the effort. That I'll agree with, for all that it's occasionally handy. p.s. Kernel globbing: 1) it reduces A LOT the traffic required across a network (or across the kernel/user interface). 2) it's universal - all programs get the same globbing and it doesn't depend on the shell 3) it makes "mv *.c *.c.old" possible 4) it makes syntaxes to commands that need regexps or regexp characters in arguments simpler, especially for non-hacker users. (I've written shells, and I still end up playing the "Ok, lets add quotes and \'s at semi-random until I get the result I want" game way too often.) 5) it works well as part of a unified command-line-parsing package that all program should use (kinda like getopt and the gnu parsing stuff), which is something that's still very iffy in Unix mostly due to history. Yes, I know there are downsides too, and that it'll never happen in Unix because it's assumed to be the work of the shell by all commands, but I can dream, can't I? (One of the few things I LOVED about Stratus VOS (made by a bunch of ex-Multics hackers) was the command-line parsing utilities, and the display-form capability (plus that every OS and user command used it and that all options were spelled out in english. Of course, this made aliases important - and it supported only simple ones, like "alias cd change_current_directory". Unlike Unix, which tried hard to minimize typing, VOS assumed you liked to type. ;-) -- Randell Jesup, Worldgate Communications, ex-Scala, ex-Amiga OS team ('88-94) rjesup@wgate.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ybupuf0ihyc.fsf>