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>
37 uint64_t oc_conn_addr;
38 uint64_t oc_conn_cookie;
39 struct obd_ioctl_data oc_data;
43 struct obdio_barrier {
51 extern struct obdio_conn * obdio_connect (int device);
52 extern void obdio_disconnect (struct obdio_conn *conn);
53 extern int obdio_open (struct obdio_conn *conn, uint64_t oid,
54 struct lustre_handle *fh);
55 extern int obdio_close (struct obdio_conn *conn, uint64_t oid,
56 struct lustre_handle *fh);
57 extern int obdio_pread (struct obdio_conn *conn, uint64_t oid,
58 char *buffer, uint32_t count, uint64_t offset);
59 extern int obdio_pwrite (struct obdio_conn *conn, uint64_t oid,
60 char *buffer, uint32_t count, uint64_t offset);
61 extern int obdio_enqueue (struct obdio_conn *conn, uint64_t oid,
62 int mode, uint64_t offset, uint32_t count,
63 struct lustre_handle *lh);
64 extern int obdio_cancel (struct obdio_conn *conn, struct lustre_handle *lh);
65 extern void *obdio_alloc_aligned_buffer (void **spacep, int size);
66 extern struct obdio_barrier *obdio_new_barrier (uint64_t oid, uint64_t id, int npeers) ;
67 extern int obdio_setup_barrier (struct obdio_conn *conn, struct obdio_barrier *b);
68 extern int obdio_barrier (struct obdio_conn *conn, struct obdio_barrier *b);