Whamcloud - gitweb
Remove global atomic counter for MDS opens, it just slows things down.
authoradilger <adilger>
Thu, 5 Aug 2004 23:55:53 +0000 (23:55 +0000)
committeradilger <adilger>
Thu, 5 Aug 2004 23:55:53 +0000 (23:55 +0000)
lustre/include/linux/obd.h
lustre/mds/handler.c
lustre/mds/lproc_mds.c
lustre/mds/mds_open.c

index 56eab77..55ad715 100644 (file)
@@ -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;
         /*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;
         int                              mds_config_version;
 
         char                            *mds_lmv_name;
index d84cf6b..38512da 100644 (file)
@@ -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);
         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,
         atomic_set(&mds->mds_real_clients, 0);
 
         obd->obd_namespace = ldlm_namespace_new(obd->obd_name,
index 8b2426b..b7f519e 100644 (file)
@@ -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);
 }
 
         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)
 {
 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 },
         { "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 },
         { "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 },
index 212990a..244b593 100644 (file)
@@ -1149,8 +1149,6 @@ got_child:
                 else
                         ptlrpc_save_lock (req, parent_lockh, parent_mode);
         }
                 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);
         if (mea)
                 OBD_FREE(mea, mea_size);
         RETURN(rc);
@@ -1324,7 +1322,6 @@ out:
         mds_mfd_destroy(mfd);
 
  cleanup:
         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) {
         if (req != NULL && reply_body != NULL) {
                 rc = mds_finish_transno(mds, pending_dir, handle, req, rc, 0);
         } else if (handle) {