From: adilger Date: Thu, 5 Aug 2004 23:55:53 +0000 (+0000) Subject: Remove global atomic counter for MDS opens, it just slows things down. X-Git-Tag: v1_7_100~1996 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6296b728b7b839b14750479ae5d9020bd7bc789f;hp=215bdb731448cdb110c46af8d325adcf5aa2bf79 Remove global atomic counter for MDS opens, it just slows things down. --- diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index 56eab77..55ad715 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -337,7 +337,6 @@ struct mds_obd { /*add mds num here for real mds and cache mds create FIXME later will be totally fixed by b_cmd*/ int mds_num; - atomic_t mds_open_count; int mds_config_version; char *mds_lmv_name; diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index d84cf6b..38512da 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -2052,7 +2052,6 @@ static int mds_setup(struct obd_device *obd, obd_count len, void *buf) sema_init(&mds->mds_epoch_sem, 1); spin_lock_init(&mds->mds_transno_lock); mds->mds_max_cookiesize = sizeof(struct llog_cookie); - atomic_set(&mds->mds_open_count, 0); atomic_set(&mds->mds_real_clients, 0); obd->obd_namespace = ldlm_namespace_new(obd->obd_name, diff --git a/lustre/mds/lproc_mds.c b/lustre/mds/lproc_mds.c index 8b2426b..b7f519e 100644 --- a/lustre/mds/lproc_mds.c +++ b/lustre/mds/lproc_mds.c @@ -50,17 +50,6 @@ static int lprocfs_mds_rd_mntdev(char *page, char **start, off_t off, int count, return snprintf(page, count, "%s\n",obd->u.mds.mds_vfsmnt->mnt_devname); } -static int lprocfs_mds_rd_filesopen(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct obd_device *obd = data; - LASSERT(obd != NULL); - *eof = 1; - - return snprintf(page, count, "%d\n", - atomic_read(&obd->u.mds.mds_open_count)); -} - static int lprocfs_mds_rd_recovery_status(char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -172,7 +161,6 @@ struct lprocfs_vars lprocfs_mds_obd_vars[] = { { "fstype", lprocfs_rd_fstype, 0, 0 }, { "filestotal", lprocfs_rd_filestotal, 0, 0 }, { "filesfree", lprocfs_rd_filesfree, 0, 0 }, - { "filesopen", lprocfs_mds_rd_filesopen, 0, 0 }, { "mntdev", lprocfs_mds_rd_mntdev, 0, 0 }, { "recovery_status", lprocfs_mds_rd_recovery_status, 0, 0 }, { "evict_client", 0, lprocfs_mds_wr_evict_client, 0 }, diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 212990a..244b593 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -1149,8 +1149,6 @@ got_child: else ptlrpc_save_lock (req, parent_lockh, parent_mode); } - if (rc == 0) - atomic_inc(&mds->mds_open_count); if (mea) OBD_FREE(mea, mea_size); RETURN(rc); @@ -1324,7 +1322,6 @@ out: mds_mfd_destroy(mfd); cleanup: - atomic_dec(&mds->mds_open_count); if (req != NULL && reply_body != NULL) { rc = mds_finish_transno(mds, pending_dir, handle, req, rc, 0); } else if (handle) {