1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Data structures for object storage targets and client: OST & OSC's
23 * See also lustre_idl.h for wire formats of requests.
30 #include <linux/obd_support.h>
32 #define LUSTRE_OST_NAME "ost"
33 #define LUSTRE_OSC_NAME "osc"
36 struct ptlrpc_service *ost_service;
38 struct obd_device *ost_tgt;
39 struct obd_conn ost_conn;
43 int ost_pack_req(char *buf1, int buflen1, char *buf2, int buflen2, struct ptlreq_hdr **hdr, union ptl_req *req, int *len, char **buf);
44 int ost_unpack_req(char *buf, int len, struct ptlreq_hdr **hdr, union ptl_req *req);
45 int ost_pack_rep(char *buf1, int buflen1, char *buf2, int buflen2,
46 struct ptlrep_hdr **hdr, union ptl_rep *r,
47 int *len, char **buf);
48 int ost_unpack_rep(char *buf, int len, struct ptlrep_hdr **hdr, union ptl_rep *rep);
50 void ost_pack_niobuf(void **tmp, void *addr, __u64 offset, __u32 len,
51 __u32 flags, __u32 xid);
52 void ost_unpack_niobuf(void **tmp, struct niobuf **nbp);
53 void ost_pack_ioo(void **tmp, struct obdo *oa, int bufcnt);
54 void ost_unpack_ioo(void **tmp, struct obd_ioobj **ioop);
55 void *ost_req_buf2(struct ost_req *req);
56 void *ost_req_buf1(struct ost_req *req);
57 void *ost_rep_buf2(struct ost_rep *rep);
58 void *ost_rep_buf1(struct ost_rep *rep);