/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/sysmacros.h>
#include <vm/seg_kmem.h>
/*
* Pseudo-bio routines which use a segmap mapping to address file data.
*/
/*
* Return a pointer to locked kernel virtual address for
* the given <vp, off> for len bytes. It is not allowed to
* have the offset cross a MAXBSIZE boundary over len bytes.
*/
int
{
ulong_t o;
if (segmap_kpm) {
} else {
}
if (err) {
else
return (EIO);
}
return (0);
}
/*
* Similar to fbread() but we call segmap_pagecreate instead of using
* segmap_fault for SOFTLOCK to create the pages without using VOP_GETPAGE
* and then we zero up to the length rounded to a page boundary.
* XXX - this won't work right when bsize < PAGESIZE!!!
*/
void
{
if (segmap_kpm) {
} else {
}
/*
* Now we zero all the memory in the mapping we are interested in.
*/
}
/*
* FBCOMMON() is the common code for fbrelse, fbwrite and variants thereof:
*
* fbrelse() release fbp
* fbwrite() direct write
* fbdwrite() delayed write
*/
{ \
}
void
{
}
int
{
}
int
{
}
/*
* Perform a synchronous indirect write of the given block number
* on the given device, using the given fbuf. Upon return the fbp
* is invalid.
*/
int
{
/*
* Allocate a temp bp using pageio_setup, but then use it
* for physio to the area mapped by fbuf which is currently
* all locked down in place.
*
* XXX - need to have a generalized bp header facility
* which we build up pageio_setup on top of. Other places
* (like here and in device drivers for the raw I/O case)
* could then use these new facilities in a more straight
* forward fashion instead of playing all these games.
*/
(void) bdev_strategy(bp);
/*CSTYLED*/
}