From owner-freebsd-current@FreeBSD.ORG Fri Sep 26 15:39:19 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EEB616A4B3 for ; Fri, 26 Sep 2003 15:39:19 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9D2943FF5 for ; Fri, 26 Sep 2003 15:39:18 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id h8QMcm7R066369; Fri, 26 Sep 2003 18:38:48 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h8QMcmcL066366; Fri, 26 Sep 2003 18:38:48 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Fri, 26 Sep 2003 18:38:48 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: David Gilbert In-Reply-To: <16244.40636.428865.644209@canoe.dclg.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: recent changes prohibit vinum swap. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 22:39:19 -0000 On Fri, 26 Sep 2003, David Gilbert wrote: > Recent changes to -CURRENT prohibit vinum swap: > > [1:6:306]root@mu:~> swapon /dev/vinum/swapmu swapon: /dev/vinum/swapmu: > Operation not supported by device In order to support swapping, Vinum will need to be modified to use struct disk and the disk(9) API, rather than exposing its storage devices directly via struct cdevsw and make_dev(9). I.e., Vinum probably needs to start approaching things as "disks" rather than "devices", a distinction that's becoming more mature in -CURRENT. >From a quick read of vinumconfig.c, I'm guessing this wouldn't be hard to implement. Some subset of struct sd, struct plex, and struct volume will need to start holding a struct disk instance which would be passed to disk_create() instead of a call to make_dev(). Much of the remainder will just consist of a bit of tweaking to make Vinum extract its data from bp->bio_disk->d_drv1 instead of bp->b_dev, replacing the ioctl dev_t argument with a disk argument, etc. I recently noticed that Vinum may be averse to blocksizes other than 512 bytes. Or at least, I can get Vinum mirrors up and running on md devices backed to memory, but not to swap, and the usual reason for problems on that front is the 4k blocksize for swap-backed md devices. I also noticed that the vinum commandline tool is a bit devfs-unfriendly, or at least, it gets pretty verbose about how all the files/directories it wants to create are already present. It could be that a test for devfs conditionally causing a test for EEXIST would go a long way in muffling the somewhat loud complaining :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories