2 * Copyright (c) 2012 Your File System, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * - Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - Neither the name of Your File System, Inc nor the names of its
15 * contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission from
17 * Your File System, Inc.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
23 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #ifndef OPENAFS_WINNT_AFSD_CM_DIRECT_H
33 #define OPENAFS_WINNT_AFSD_CM_DIRECT_H 1
36 cm_SetupDirectStoreBIOD( cm_scache_t *scp,
44 cm_DirectWrite( IN cm_scache_t *scp,
45 IN osi_hyper_t *offsetp,
50 IN void *memoryRegionp,
51 OUT afs_uint32 *bytesWritten);
53 #define CM_DIRECT_SCP_LOCKED 0x1
55 typedef struct rock_BkgDirectWrite {
58 afs_uint32 bypass_cache;
60 cm_bulkIO_t biod; /* bulk IO descriptor */
61 } rock_BkgDirectWrite_t;
64 cm_BkgDirectWrite( cm_scache_t *scp, void *rockp, struct cm_user *userp, cm_req_t *reqp);
67 cm_BkgDirectWriteDone( cm_scache_t *scp, void *vrockp, afs_int32 code);