From 6e5cc79f1eb3967a637a8f08a9ad76c568d98c46 Mon Sep 17 00:00:00 2001 From: shaver Date: Wed, 16 Jul 2003 09:50:53 +0000 Subject: [PATCH] b=1534: Avoid g_f_w and friends for updating last_rcvd records, and instead perform simple buffer-cache operations. Fixes an OST (and possible, though rare and possibly never seen, MDS) deadlock case. --- lustre/obdfilter/filter_internal.h | 3 ++- lustre/obdfilter/filter_log.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index c1d8427..2d4e73c 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -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); diff --git a/lustre/obdfilter/filter_log.c b/lustre/obdfilter/filter_log.c index 790659d..0c9a984 100644 --- a/lustre/obdfilter/filter_log.c +++ b/lustre/obdfilter/filter_log.c @@ -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); -- 1.8.3.1