From 4c53114daae7f9b2c90a24b173708a621907e05d Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 2 Mar 2004 20:13:23 +0000 Subject: Make swapbacked md(4) devices respect the -x and -y emulation arguments. --- sys/dev/md/md.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/dev') diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 1d66856..4564aa69 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1050,6 +1050,10 @@ mdcreate_swap(struct md_ioctl *mdio, struct thread *td) sc->secsize = DEV_BSIZE; sc->npage = mdio->md_size / (PAGE_SIZE / DEV_BSIZE); sc->nsect = sc->npage * (PAGE_SIZE / DEV_BSIZE); + if (mdio->md_fwsectors != 0) + sc->fwsectors = mdio->md_fwsectors; + if (mdio->md_fwheads != 0) + sc->fwheads = mdio->md_fwheads; sc->object = vm_pager_allocate(OBJT_SWAP, NULL, PAGE_SIZE * (vm_offset_t)sc->npage, VM_PROT_DEFAULT, 0); sc->flags = mdio->md_options & MD_FORCE; -- cgit v1.1