1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 only,
10 * as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License version 2 for more details (a copy is included
16 * in the LICENSE file that accompanied this code).
18 * You should have received a copy of the GNU General Public License
19 * version 2 along with this program; If not, see
20 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
29 * Copyright 2008 Sun Microsystems, Inc. All rights reserved
30 * Use is subject to license terms.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
42 #include <sys/types.h>
45 #include <lustre_lib.h>
46 #include <lustre/lustre_idl.h>
47 #include <obd_class.h>
52 struct obd_ioctl_data oc_data;
56 struct obdio_barrier {
64 extern struct obdio_conn *obdio_connect(int device);
65 extern void obdio_disconnect(struct obdio_conn *conn, int flags);
66 extern int obdio_open(struct obdio_conn *conn, __u64 oid,
67 struct lustre_handle *fh);
68 extern int obdio_close(struct obdio_conn *conn, __u64 oid,
69 struct lustre_handle *fh);
70 extern int obdio_pread(struct obdio_conn *conn, __u64 oid,
71 void *buffer, __u32 count, __u64 offset);
72 extern int obdio_pwrite(struct obdio_conn *conn, __u64 oid,
73 void *buffer, __u32 count, __u64 offset);
74 extern int obdio_enqueue(struct obdio_conn *conn, __u64 oid,
75 int mode, __u64 offset, __u32 count,
76 struct lustre_handle *lh);
77 extern int obdio_cancel(struct obdio_conn *conn, struct lustre_handle *lh);
78 extern void *obdio_alloc_aligned_buffer(void **spacep, int size);
79 extern struct obdio_barrier *obdio_new_barrier(__u64 oid, __u64 id,
81 extern int obdio_setup_barrier(struct obdio_conn *conn,struct obdio_barrier *b);
82 extern int obdio_barrier(struct obdio_conn *conn, struct obdio_barrier *b);