4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License version 2 for more details (a copy is included
14 * in the LICENSE file that accompanied this code).
16 * You should have received a copy of the GNU General Public License
17 * version 2 along with this program; If not, see
18 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21 * CA 95054 USA or visit www.sun.com if you need additional information or
27 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
28 * Use is subject to license terms.
31 * This file is part of Lustre, http://www.lustre.org/
32 * Lustre is a trademark of Sun Microsystems, Inc.
40 #include <sys/types.h>
43 #include <lustre_lib.h>
44 #include <lustre/lustre_idl.h>
45 #include <obd_class.h>
50 struct obd_ioctl_data oc_data;
54 struct obdio_barrier {
62 extern struct obdio_conn *obdio_connect(int device);
63 extern void obdio_disconnect(struct obdio_conn *conn, int flags);
64 extern int obdio_open(struct obdio_conn *conn, __u64 oid,
65 struct lustre_handle *fh);
66 extern int obdio_close(struct obdio_conn *conn, __u64 oid,
67 struct lustre_handle *fh);
68 extern int obdio_pread(struct obdio_conn *conn, __u64 oid,
69 void *buffer, __u32 count, __u64 offset);
70 extern int obdio_pwrite(struct obdio_conn *conn, __u64 oid,
71 void *buffer, __u32 count, __u64 offset);
72 extern int obdio_enqueue(struct obdio_conn *conn, __u64 oid,
73 int mode, __u64 offset, __u32 count,
74 struct lustre_handle *lh);
75 extern int obdio_cancel(struct obdio_conn *conn, struct lustre_handle *lh);
76 extern void *obdio_alloc_aligned_buffer(void **spacep, int size);
77 extern struct obdio_barrier *obdio_new_barrier(__u64 oid, __u64 id,
79 extern int obdio_setup_barrier(struct obdio_conn *conn,struct obdio_barrier *b);
80 extern int obdio_barrier(struct obdio_conn *conn, struct obdio_barrier *b);