From owner-freebsd-hackers Sun Jan 7 02:30:40 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA02700 for hackers-outgoing; Sun, 7 Jan 1996 02:30:40 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id CAA02674 for ; Sun, 7 Jan 1996 02:30:15 -0800 (PST) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id VAA20309; Sun, 7 Jan 1996 21:03:19 +1030 From: Michael Smith Message-Id: <199601071033.VAA20309@genesis.atrad.adelaide.edu.au> Subject: Re: Add new slice to running system, comments? To: phk@critter.tfs.com (Poul-Henning Kamp) Date: Sun, 7 Jan 1996 21:03:18 +1030 (CST) Cc: msmith@atrad.adelaide.edu.au, hackers@FreeBSD.ORG In-Reply-To: <5567.821006130@critter.tfs.com> from "Poul-Henning Kamp" at Jan 7, 96 10:15:30 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG Precedence: bulk Poul-Henning Kamp stands accused of saying: > > > It looks like I want to add another ioctl to dsioctl(), which takes a new > > diskslice structure and adds it to the list for the given disk. > > Well, this is not that easy actually, because the current slice code > really dislikes overlapping slices. Just at startup, or during normal operations? There are arguments pro and con having the detection code in the kernel; one of the pros would be that you could make a slab and put a filesystem in it, and then have a full-speed filesystem (and swap on the Windows swapfile) without repartitioning, for all those users with cold feet. The cons to this obviously lie in the extra bootstrap code and kernel bloat, although the current detect-and-rave-verbosely code is only about 300 lines. > Have you tried mounting the msdos fs, and using the vn driver for > swapping on the windows file ? This still means that swap operations have to go through the FAT filesystem code, which is slow and buggy. I'm looking for a performance solution here, not a crumb to throw to people with space problems. Can you be more explicit about "dislikes overlapping slices"? If it's just a case of some sanity code, I could use a different slice type and special case the tests. If it's more complex, a brief explanation and a 'look here for details' would be fine. > > (slice numbering in the structure itself is _weird). Will I be able > > to swap on this, or will I have to knock up a label for it? > No, that would work fine. > You could even newfs it :-) That's not as silly as it sounds, per the idea above. > Isn't there some static gunk in these files that we shouldn't write ? > I belive that if you mess with the administrative structures windows > will barf. I have a virgin 386spart.par here for reference. Most of the file is full of 0x6c (vigin sector filler), except for two regions 0x200 long at the beginning and end which have every fourth byte incrementing. It looks like this (custom hexdump output, sorry 8) : 1401400: 6d 6c 6c 6c 6e 6c 6c 6c - 6f 6c 6c 6c 68 6c 6c 6c mlllnlllolllhlll 1401410: 69 6c 6c 6c 6a 6c 6c 6c - 6b 6c 6c 6c 64 6c 6c 6c illljlllkllldlll 1401420: 65 6c 6c 6c 66 6c 6c 6c - 67 6c 6c 6c 60 6c 6c 6c elllflllglll`lll 1401430: 61 6c 6c 6c 62 6c 6c 6c - 63 6c 6c 6c 7c 6c 6c 6c alllblllclll|lll ... 14015c0: 1d 6c 6c 6c 1e 6c 6c 6c - 1f 6c 6c 6c 18 6c 6c 6c .lll.lll.lll.lll 14015d0: 19 6c 6c 6c 1a 6c 6c 6c - 1b 6c 6c 6c 14 6c 6c 6c .lll.lll.lll.lll 14015e0: 15 6c 6c 6c 16 6c 6c 6c - 17 6c 6c 6c 10 6c 6c 6c .lll.lll.lll.lll 14015f0: 11 6c 6c 6c 12 6c 6c 6c - 13 6c 6c 6c ec 6c 6c 6c .lll.lll.lll.lll The first one is at 0x1600, the file ends at 0x1402000, which doesn't make any sense to me yet but I'm sure something may click 8) Obviously I'll experiment to see what happens to these when Windows starts swapping on the file, and what Windows says about it when I trash these regions. > > - What partition type should I allocate to the slice? I'd like to use > > something unique, but I suspect that to swap on it I'll need to use > > 165. Any comments? > Anything should be ok. Ok; I'll use something unique so that detecting it will be easier. *sigh* anyone have a list of the partition types currently in use? Thanks for the quick response! I sent some mail to your tfs address a while back about this, you can ignore it now 8) > Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] "Who does BSD?" "We do Chucky, we do." [[