diff options
Diffstat (limited to 'sys/dev/dm/dm_target_linear.c')
| -rw-r--r-- | sys/dev/dm/dm_target_linear.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/dm/dm_target_linear.c b/sys/dev/dm/dm_target_linear.c index a6a93611e2d..fc5fde8bdc5 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.9 2010/01/04 00:14:41 haad Exp $ */ +/* $NetBSD: dm_target_linear.c,v 1.10 2010/05/18 15:10:38 haad Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -141,6 +141,22 @@ dm_target_linear_strategy(dm_table_entry_t * table_en, struct buf * bp) } /* + * Sync underlying disk caches. + */ +int +dm_target_linear_sync(dm_table_entry_t * table_en) +{ + int cmd; + dm_target_linear_config_t *tlc; + + tlc = table_en->target_config; + + cmd = 1; + + return VOP_IOCTL(tlc->pdev->pdev_vnode, DIOCCACHESYNC, &cmd, + FREAD|FWRITE, kauth_cred_get()); +} +/* * Destroy target specific data. Decrement table pdevs. */ int |
