* See the file COPYING in this distribution
*/
+/* lov_obd.c */
int lov_get_stripecnt(struct lov_obd *lov, int stripe_count);
int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count);
void lov_free_memmd(struct lov_stripe_md **lsmp);
+
+/* lov_pack.c */
+int lov_packmd(struct lustre_handle *conn, struct lov_mds_md **lmm,
+ struct lov_stripe_md *lsm);
+int lov_unpackmd(struct lustre_handle *conn, struct lov_stripe_md **lsm,
+ struct lov_mds_md *lmm, int lmmsize);
+int lov_setstripe(struct lustre_handle *conn,
+ struct lov_stripe_md **lsmp, struct lov_mds_md *lmmu);
+int lov_getstripe(struct lustre_handle *conn,
+ struct lov_stripe_md *lsm, struct lov_mds_md *lmmu);
+
+/* lproc_lov.c */
+extern struct file_operations lov_proc_target_fops;
#endif
#define LAST_RCVD "last_rcvd"
-#define INIT_OBJID 2
+#define FILTER_INIT_OBJID 2
+/* max creates/sec * journal->j_commit_interval */
+#define FILTER_SKIP_OBJID (10000 * 5)
#define FILTER_LR_SERVER_SIZE 512
void f_dput(struct dentry *);
struct dentry *filter_fid2dentry(struct obd_device *, struct dentry *dir,
obd_mode mode, obd_id id);
-struct dentry *__filter_oa2dentry(struct obd_device *obd,struct obdo *oa,
+struct dentry *__filter_oa2dentry(struct obd_device *obd, struct obdo *oa,
const char *what);
#define filter_oa2dentry(obd, oa) __filter_oa2dentry(obd, oa, __FUNCTION__)
int filter_finish_transno(struct obd_export *, struct obd_trans_info *, int rc);
__u64 filter_next_id(struct filter_obd *);
-int filter_update_server_data(struct file *, struct filter_server_data *);
+int filter_update_server_data(struct obd_device *, struct file *,
+ struct filter_server_data *);
int filter_common_setup(struct obd_device *, obd_count len, void *buf,
char *option);
obd_id oid, obd_count ogen, struct llog_cookie *);
int filter_log_op_orphan(struct llog_handle *cathandle, obd_id oid,
obd_count ogen, struct llog_cookie *);
+struct llog_handle *filter_get_catalog(struct obd_device *);
+void filter_put_catalog(struct llog_handle *cathandle);
/* filter_san.c */
int filter_san_setup(struct obd_device *obd, obd_count len, void *buf);
GOTO(out_child, rc);
}
- rc = filter_update_server_data(filter->fo_rcvd_filp, filter->fo_fsd);
+ rc = filter_update_server_data(obd, filter->fo_rcvd_filp,
+ filter->fo_fsd);
if (rc) {
CERROR("can't write lastobjid but log created: rc %d\n",rc);
GOTO(out_destroy, rc);
}
/* This is called from filter_setup() and should be single threaded */
-static struct llog_handle *filter_get_catalog(struct obd_device *obd)
+struct llog_handle *filter_get_catalog(struct obd_device *obd)
{
struct filter_obd *filter = &obd->u.filter;
struct filter_server_data *fsd = filter->fo_fsd;
lgl = &cathandle->lgh_cookie.lgc_lgl;
fsd->fsd_catalog_oid = cpu_to_le64(lgl->lgl_oid);
fsd->fsd_catalog_ogen = cpu_to_le32(lgl->lgl_ogen);
- rc = filter_update_server_data(filter->fo_rcvd_filp, fsd);
+ rc = filter_update_server_data(obd, filter->fo_rcvd_filp, fsd);
if (rc) {
CERROR("error writing new catalog to disk: rc %d\n",rc);
GOTO(out_handle, rc);
goto out;
}
-static void filter_put_catalog(struct llog_handle *cathandle)
+void filter_put_catalog(struct llog_handle *cathandle)
{
struct llog_handle *loghandle, *n;
int rc;