[PVFS2-CVS]
commit by neill in pvfs2/src/client/sysint: acache.c acache.h
fs-add.c
CVS commit program
cvs at parl.clemson.edu
Wed Jul 28 14:05:13 EDT 2004
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb:/tmp/cvs-serv8193/src/client/sysint
Modified Files:
acache.c acache.h fs-add.c
Log Message:
- fixed typo in fs-remove comment
- fixed fs-remove by making sure we reload the cached config
information (to avoid keeping no longer valid fs data/mapping in
memory, even though it shouldn't be referenced)
- apply Nathan's acache.patch first referenced at:
http://www.beowulf-underground.org/pipermail/pvfs2-developers/2004-July/000737.html
but with the following changes:
- used long option of --acache-timeout instead of --acache
- updated print_help information to reflect that
- bounded the timeout to the smallest (run-time determined) handle
recycle timeout based on dynamic mounts from the servers
- this required a way to reinitialize the acache at run-time to be
sure there are no cached entries with old timeouts
- adopted the following behaviour when the user specifies a huge
timeout value:
1) init the acache to that value on startup (won't be used at all)
2) on mount, use the min of that value and the min handle recycle
time based on server configs and reinitialize the acache
3) on unmount, use the (potentially new) min of the cmdline value
and the min handle recycle time based on server configs and
reinit the acache (the new min can be higher than the last, so
this tries to keep it closer to the big user specified timeout)
Index: acache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/acache.c,v
diff -p -u -r1.13 -r1.14
--- acache.c 28 Jul 2004 14:32:30 -0000 1.13
+++ acache.c 28 Jul 2004 17:05:13 -0000 1.14
@@ -148,6 +148,12 @@ void PINT_acache_finalize()
acache_debug("PINT_acache_finalize exiting\n");
}
+int PINT_acache_reinitialize(void)
+{
+ PINT_acache_finalize();
+ return PINT_acache_initialize();
+}
+
/*
internal use only -- does a lookup without involving the pinode
locks or reference counts; always done with the interface lock and
Index: acache.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/acache.h,v
diff -p -u -r1.7 -r1.8
--- acache.h 28 Jul 2004 14:32:30 -0000 1.7
+++ acache.h 28 Jul 2004 17:05:13 -0000 1.8
@@ -102,6 +102,7 @@ typedef struct
int PINT_acache_initialize(void);
void PINT_acache_finalize(void);
+int PINT_acache_reinitialize(void);
int PINT_acache_get_timeout(void);
void PINT_acache_set_timeout(int max_timeout_ms);
int PINT_acache_get_size(void);
Index: fs-add.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/fs-add.c,v
diff -p -u -r1.19 -r1.20
--- fs-add.c 28 Jul 2004 14:32:31 -0000 1.19
+++ fs-add.c 28 Jul 2004 17:05:13 -0000 1.20
@@ -130,10 +130,11 @@ int PVFS_sys_fs_add(struct PVFS_sys_mnte
return ret;
}
-/* PVFS_sys_fs_add()
+/* PVFS_sys_fs_remove()
*
* tells the system interface to dynamically "unmount" a mounted file
- * system
+ * system by removing the configuration info and reloading the cached
+ * configuration interface
*
* returns 0 on success, -PVFS_error on failure
*/
@@ -153,6 +154,12 @@ int PVFS_sys_fs_remove(struct PVFS_sys_m
PVFS_perror_gossip("PINT_server_config_mgr_remove_config "
"failed", ret);
}
+
+ /*
+ reload all handle mappings as well as the interface with
+ the new configuration information
+ */
+ PINT_server_config_mgr_reload_cached_config_interface();
}
gen_mutex_unlock(&mt_config);
}
More information about the PVFS2-CVS
mailing list