summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-03-02 20:13:23 +0000
committerphk <phk@FreeBSD.org>2004-03-02 20:13:23 +0000
commit4c53114daae7f9b2c90a24b173708a621907e05d (patch)
treed5e46a7c4fd1bf4ab5485f65b1d801ed6ad57439 /sys/dev/md/md.c
parent5a199c908b108f81b40e48ab96db24a3da66d864 (diff)
downloadFreeBSD-src-4c53114daae7f9b2c90a24b173708a621907e05d.zip
FreeBSD-src-4c53114daae7f9b2c90a24b173708a621907e05d.tar.gz
Make swapbacked md(4) devices respect the -x and -y emulation arguments.
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c4
1 files changed, 4 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud