diff options
| author | hannken <hannken@NetBSD.org> | 2014-06-14 07:39:00 +0000 |
|---|---|---|
| committer | hannken <hannken@NetBSD.org> | 2014-06-14 07:39:00 +0000 |
| commit | 972c4e43674c8f7855eb1ff4ccb9c2ec3be05bc0 (patch) | |
| tree | e2c9bfd67c6e90a9ceb05b5d48bc465955949342 /sys/dev/dm/dm_target_linear.c | |
| parent | 88f50c82d078baa660c1e8b3792370f7b177ce03 (diff) | |
Change dk_lookup() to return an anonymous vnode not associated with
any file system. Change all consumers of dk_lookup() to get the
device from "v_rdev" instead of VOP_GETATTR() as specfs does not
support VOP_GETATTR(). Devices obtained with dk_lookup() will no
longer disappear on forced unmounts.
Fix for PR kern/48849 (root mirror raid fails on shutdown)
Welcome to 6.99.44
Diffstat (limited to 'sys/dev/dm/dm_target_linear.c')
| -rw-r--r-- | sys/dev/dm/dm_target_linear.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/dm/dm_target_linear.c b/sys/dev/dm/dm_target_linear.c index 7a03f173fe2..098445be784 100644 --- a/sys/dev/dm/dm_target_linear.c +++ b/sys/dev/dm/dm_target_linear.c @@ -1,4 +1,4 @@ -/* $NetBSD: dm_target_linear.c,v 1.13 2011/10/14 09:23:30 hannken Exp $ */ +/* $NetBSD: dm_target_linear.c,v 1.14 2014/06/14 07:39:00 hannken Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -192,22 +192,14 @@ int dm_target_linear_deps(dm_table_entry_t * table_en, prop_array_t prop_array) { dm_target_linear_config_t *tlc; - struct vattr va; - - int error; if (table_en->target_config == NULL) return ENOENT; tlc = table_en->target_config; - vn_lock(tlc->pdev->pdev_vnode, LK_SHARED | LK_RETRY); - error = VOP_GETATTR(tlc->pdev->pdev_vnode, &va, curlwp->l_cred); - VOP_UNLOCK(tlc->pdev->pdev_vnode); - if (error != 0) - return error; - - prop_array_add_uint64(prop_array, (uint64_t) va.va_rdev); + prop_array_add_uint64(prop_array, + (uint64_t) tlc->pdev->pdev_vnode->v_rdev); return 0; } |
