From owner-freebsd-hackers Sat Jan 6 22:53:35 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id WAA20158 for hackers-outgoing; Sat, 6 Jan 1996 22:53:35 -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 WAA20136 for ; Sat, 6 Jan 1996 22:53:26 -0800 (PST) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id RAA19890 for hackers@freebsd.org; Sun, 7 Jan 1996 17:27:24 +1030 From: Michael Smith Message-Id: <199601070657.RAA19890@genesis.atrad.adelaide.edu.au> Subject: Add new slice to running system, comments? To: hackers@freebsd.org Date: Sun, 7 Jan 1996 17:27:24 +1030 (CST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk I've had some grace time waiting for my new junkbox to build -current (two days and going strong, just waiting for it to fall over on the rpc stuff so I can document the details and restart it 8). I recall a few people wanting to be able to swap on Windows swapfiles, so I've put together some generic code to identify and check them. What I need now is some way to stuff the details of the disk region the swapfile occupies into the kernel as a slice, so that one can then swap on it. 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. I need some answers to the following, which I haven't been able to resolve by ratting around in the kernel. - If I just add the slice, will I be able to swap on the block device for it? eg. for /dev/wd0 with no extended gumpf, we'd come in as /dev/wd0s5 (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? - 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? - If I have to cons a label, which fields are necessary? There's a lot of cruft in there that's not even vaguely relevant, but I can't be sure of all of it. - Is the OS/2 SWAPER.DAT file allocated contiguously? (I believe not). If it is, I may add support for hunting it down (currently only files in the root directory are supported). If anyone (Poul? 8) can supply some answers, I'll finish this off and submit it. I still have my slab-creating code left, so it would be quite practical for a startup to sawp onto a Windows swapfile, and then allocate the largest free section of the FAT filesystem and use that as swap as well. Terry; if you go ahead with your FAT filesystem rewrite (please do!), let me know how I can lock such files against damage. -- ]] 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." [[