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.
6 * This code is issued under the GNU General Public License.
7 * See the file COPYING in this distribution
10 #ifndef LOV_INTERNAL_H
11 #define LOV_INTERNAL_H
13 #include <lustre/lustre_user.h>
15 #define LAP_MAGIC 8200
17 #define LOV_MAX_TGT_COUNT 1024
19 static inline int lov_tgt_changed(struct lov_obd *lov, struct lov_oinfo *loi)
21 return lov->tgts[loi->loi_ost_idx].ltd_gen != loi->loi_ost_gen;
24 struct lov_async_page {
27 obd_off lap_sub_offset;
29 struct obd_async_page_ops *lap_caller_ops;
30 struct obd_async_page_ops *lap_caller_data;
35 int lov_get_stripecnt(struct lov_obd *lov, int stripe_count);
36 int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count, int pattern);
37 void lov_free_memmd(struct lov_stripe_md **lsmp);
40 int lov_llog_init(struct obd_device *, struct obd_llogs *,
41 struct obd_device *, int, struct llog_catid *);
42 int lov_llog_finish(struct obd_device *, struct obd_llogs *, int);
45 int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmm,
46 struct lov_stripe_md *lsm);
47 int lov_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
48 struct lov_mds_md *lmm, int lmm_bytes);
49 int lov_setstripe(struct obd_export *exp,
50 struct lov_stripe_md **lsmp, struct lov_user_md *lump);
51 int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp,
52 struct lov_user_md *lump);
53 int lov_getstripe(struct obd_export *exp,
54 struct lov_stripe_md *lsm, struct lov_user_md *lump);
57 extern struct file_operations lov_proc_target_fops;