Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jan 1996 17:27:24 +1030 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        hackers@freebsd.org
Subject:   Add new slice to running system, comments?
Message-ID:  <199601070657.RAA19890@genesis.atrad.adelaide.edu.au>

next in thread | raw e-mail | index | archive | help
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."                               [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601070657.RAA19890>