From 0cae15d7dabc925fa83bb1899d438ef7802c3f28 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 30 Jul 2003 20:35:18 +0000 Subject: [PATCH] Ensure OST objids are unique even after a crash by using the mount count as a generation number. Remove old "superhack" code. Add a "force_sync" parameter to filter_update_server_data() and fsfilt_write_record() so that we ensure the mount_count is safe on disk when the OST has started. b=294 r=phil --- lustre/obdfilter/filter_internal.h | 4 +--- lustre/obdfilter/filter_log.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index 4207056..9f0b5ed 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -26,8 +26,6 @@ #define LAST_RCVD "last_rcvd" #define FILTER_INIT_OBJID 2 -/* max creates/sec * journal->j_commit_interval */ -#define FILTER_SKIP_OBJID (10000 * 5) #define FILTER_LR_SERVER_SIZE 512 @@ -119,7 +117,7 @@ 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 obd_device *, struct file *, - struct filter_server_data *); + struct filter_server_data *, int force_sync); 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 fe896d0..77eb078 100644 --- a/lustre/obdfilter/filter_log.c +++ b/lustre/obdfilter/filter_log.c @@ -193,7 +193,7 @@ static struct llog_handle *filter_log_create(struct obd_device *obd) } rc = filter_update_server_data(obd, filter->fo_rcvd_filp, - filter->fo_fsd); + filter->fo_fsd, 0); if (rc) { CERROR("can't write lastobjid but log created: rc %d\n",rc); GOTO(out_destroy, rc); @@ -272,7 +272,7 @@ 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(obd, filter->fo_rcvd_filp, fsd); + rc = filter_update_server_data(obd, filter->fo_rcvd_filp,fsd,0); if (rc) { CERROR("error writing new catalog to disk: rc %d\n",rc); GOTO(out_handle, rc); -- 1.8.3.1