Whamcloud - gitweb
landing b_cmobd_merge on HEAD
[fs/lustre-release.git] / lustre / lov / lov_internal.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Copyright (C) 2003 Cluster File Systems, Inc.
5  *
6  * This code is issued under the GNU General Public License.
7  * See the file COPYING in this distribution
8  */
9
10 #ifndef LOV_INTERNAL_H
11 #define LOV_INTERNAL_H
12
13 #include <lustre/lustre_user.h>
14
15 #define LAP_MAGIC 8200
16
17 struct lov_async_page {
18         int                             lap_magic;
19         int                             lap_stripe;
20         obd_off                         lap_sub_offset;
21         void                            *lap_sub_cookie;
22         struct obd_async_page_ops       *lap_caller_ops;
23         struct obd_async_page_ops       *lap_caller_data;
24         obd_id                          lap_loi_id;
25 };
26
27 /* lov_obd.c */
28 int lov_get_stripecnt(struct lov_obd *lov, int stripe_count);
29 int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count, int pattern);
30 void lov_free_memmd(struct lov_stripe_md **lsmp);
31
32 /* lov_log.c */
33 int lov_llog_init(struct obd_device *, struct obd_llogs *,
34                   struct obd_device *, int, struct llog_catid *);
35 int lov_llog_finish(struct obd_device *, struct obd_llogs *, int);
36
37 /* lov_pack.c */
38 int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmm,
39                struct lov_stripe_md *lsm);
40 int lov_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
41                  struct lov_mds_md *lmm, int lmm_bytes);
42 int lov_setstripe(struct obd_export *exp,
43                   struct lov_stripe_md **lsmp, struct lov_user_md *lump);
44 int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp,
45               struct lov_user_md *lump);
46 int lov_getstripe(struct obd_export *exp,
47                   struct lov_stripe_md *lsm, struct lov_user_md *lump);
48
49 /* lproc_lov.c */
50 extern struct file_operations lov_proc_target_fops;
51
52 #endif