diff options
| author | mlelstv <mlelstv@NetBSD.org> | 2010-12-23 14:58:13 +0000 |
|---|---|---|
| committer | mlelstv <mlelstv@NetBSD.org> | 2010-12-23 14:58:13 +0000 |
| commit | 8c3ce541fba63061602b31b4c95ff0d056f3b769 (patch) | |
| tree | ecad0048e7c4b4c04cadd3050c4a4e13a0560a33 /sys/dev/dm/dm_pdev.c | |
| parent | 4ebb5d99777fea12743bcfc8e06d466325a7f33c (diff) | |
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@
Diffstat (limited to 'sys/dev/dm/dm_pdev.c')
| -rw-r--r-- | sys/dev/dm/dm_pdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |
