Whamcloud - gitweb
merge b_devel into b_unify
authorphil <phil>
Tue, 22 Jul 2003 03:36:27 +0000 (03:36 +0000)
committerphil <phil>
Tue, 22 Jul 2003 03:36:27 +0000 (03:36 +0000)
lustre/lov/lov_internal.h
lustre/obdfilter/filter_internal.h
lustre/obdfilter/filter_log.c

index cad14ee..f3bc191 100644 (file)
@@ -7,6 +7,20 @@
  * 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;
index 93e9e23..4207056 100644 (file)
@@ -25,7 +25,9 @@
 #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
 
@@ -110,13 +112,14 @@ struct dentry *filter_parent_lock(struct obd_device *, obd_mode mode,
 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);
 
@@ -138,6 +141,8 @@ int filter_log_op_create(struct llog_handle *cathandle, struct ll_fid *mds_fid,
                          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);
index 790659d..d91e1e8 100644 (file)
@@ -192,7 +192,8 @@ static struct llog_handle *filter_log_create(struct obd_device *obd)
                 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);
@@ -233,7 +234,7 @@ out_ctxt:
 }
 
 /* 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;
@@ -271,7 +272,7 @@ static struct llog_handle *filter_get_catalog(struct obd_device *obd)
                 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);
@@ -291,7 +292,7 @@ out_handle:
         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;