1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2003 Cluster File Systems, Inc.
5 * Author: Eric Barton <eeb@clusterfs.com>
7 * This file is part of Lustre, http://www.lustre.org.
9 * Lustre is free software; you can redistribute it and/or
10 * modify it under the terms of version 2 of the GNU General Public
11 * License as published by the Free Software Foundation.
13 * Lustre is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Lustre; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <sys/types.h>
31 #include <linux/lustre_lib.h>
32 #include <linux/lustre_idl.h>
33 #include <linux/obd_class.h>
38 struct obd_ioctl_data oc_data;
42 struct obdio_barrier {
50 extern struct obdio_conn * obdio_connect (int device);
51 extern void obdio_disconnect(struct obdio_conn *conn, int flags);
52 extern int obdio_open(struct obdio_conn *conn, uint64_t oid,
53 struct lustre_handle *fh);
54 extern int obdio_close(struct obdio_conn *conn, uint64_t oid,
55 struct lustre_handle *fh);
56 extern int obdio_pread(struct obdio_conn *conn, uint64_t oid,
57 char *buffer, uint32_t count, uint64_t offset);
58 extern int obdio_pwrite(struct obdio_conn *conn, uint64_t oid,
59 char *buffer, uint32_t count, uint64_t offset);
60 extern int obdio_enqueue(struct obdio_conn *conn, uint64_t oid,
61 int mode, uint64_t offset, uint32_t count,
62 struct lustre_handle *lh);
63 extern int obdio_cancel(struct obdio_conn *conn, struct lustre_handle *lh);
64 extern void *obdio_alloc_aligned_buffer(void **spacep, int size);
65 extern struct obdio_barrier *obdio_new_barrier(uint64_t oid, uint64_t id,
67 extern int obdio_setup_barrier(struct obdio_conn *conn,
68 struct obdio_barrier *b);
69 extern int obdio_barrier(struct obdio_conn *conn, struct obdio_barrier *b);