From 8c3ce541fba63061602b31b4c95ff0d056f3b769 Mon Sep 17 00:00:00 2001 From: mlelstv Date: Thu, 23 Dec 2010 14:58:13 +0000 Subject: make dm aware of physical sector sizes. For aggregates of multiple disks we use the largest sector size from all disks. For standard power-of-2 sizes this is the same as the least common multiple. We still require proper alignment of the targets in the mapping table. ok by haad@ --- sys/dev/dm/dm_pdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/dev/dm/dm_pdev.c') diff --git a/sys/dev/dm/dm_pdev.c b/sys/dev/dm/dm_pdev.c index 7f63a463691..81867cebedb 100644 --- a/sys/dev/dm/dm_pdev.c +++ b/sys/dev/dm/dm_pdev.c @@ -1,4 +1,4 @@ -/* $NetBSD: dm_pdev.c,v 1.7 2010/11/19 06:44:40 dholland Exp $ */ +/* $NetBSD: dm_pdev.c,v 1.8 2010/12/23 14:58:13 mlelstv Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -119,6 +119,7 @@ dm_pdev_insert(const char *dev_name) kmem_free(dmp, sizeof(dm_pdev_t)); return NULL; } + getdisksize(dmp->pdev_vnode, &dmp->pdev_numsec, &dmp->pdev_secsize); dmp->ref_cnt = 1; mutex_enter(&dm_pdev_mutex); -- cgit