Whamcloud - gitweb
b=1534: Avoid g_f_w and friends for updating last_rcvd records, and instead
authorshaver <shaver>
Wed, 16 Jul 2003 09:50:53 +0000 (09:50 +0000)
committershaver <shaver>
Wed, 16 Jul 2003 09:50:53 +0000 (09:50 +0000)
        perform simple buffer-cache operations.  Fixes an OST (and possible,
though rare and possibly never seen, MDS) deadlock case.

lustre/obdfilter/filter_internal.h
lustre/obdfilter/filter_log.c

index c1d8427..2d4e73c 100644 (file)
@@ -116,7 +116,8 @@ struct dentry *__filter_oa2dentry(struct obd_device *obd,struct obdo *oa,
 
 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);
 
index 790659d..0c9a984 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);
@@ -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);