From 2e91ae4d93801feec3e2341d2f09c7d9dc198e14 Mon Sep 17 00:00:00 2001 From: nfshp Date: Thu, 3 Apr 2003 11:01:13 +0000 Subject: [PATCH] fix according to changes in b_devel merged last time: - inter_module_get - generate_random_bytes --- lustre/liblustre/lltest.c | 4 ++-- lustre/liblustre/super.c | 26 +++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/lustre/liblustre/lltest.c b/lustre/liblustre/lltest.c index 32bf120..7e65b2a 100644 --- a/lustre/liblustre/lltest.c +++ b/lustre/liblustre/lltest.c @@ -93,7 +93,7 @@ main(int argc, char * const argv[]) perror(root_driver); exit(1); } - +#if 0 for (i=0; i< sizeof(files)/sizeof(char*); i++) { printf("******** stat %s *********\n", files[i]); /* XXX ugly, only for testing */ @@ -102,7 +102,7 @@ main(int argc, char * const argv[]) perror(root_driver); printf("******** end stat %s: %d*********\n", files[i], err); } - +#endif printf("sysio is about shutdown\n"); /* * Clean up. diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c index b6a5dbb..02a6ca5 100644 --- a/lustre/liblustre/super.c +++ b/lustre/liblustre/super.c @@ -63,6 +63,28 @@ kportal_put_ni (int nal) return; } +struct ldlm_namespace; +struct ldlm_res_id; +struct obd_import; + +extern int ldlm_cli_cancel_unused(struct ldlm_namespace *ns, struct ldlm_res_id *res_id, int flags); +extern int ldlm_namespace_cleanup(struct ldlm_namespace *ns, int local_only); +extern int ldlm_replay_locks(struct obd_import *imp); + +void *inter_module_get(char *arg) +{ + if (!strcmp(arg, "tcpnal_ni")) + return &tcpnal_ni; + else if (!strcmp(arg, "ldlm_cli_cancel_unused")) + return ldlm_cli_cancel_unused; + else if (!strcmp(arg, "ldlm_namespace_cleanup")) + return ldlm_namespace_cleanup; + else if (!strcmp(arg, "ldlm_replay_locks")) + return ldlm_replay_locks; + else + return NULL; +} + void init_current(char *comm) { current = malloc(sizeof(*current)); @@ -364,7 +386,9 @@ llu_fsswop_mount(const char *source, struct obd_uuid param_uuid; class_uuid_t uuid; struct obd_device *obd; - char *osc="lov1_UUID", *mdc="57f5ded574_MDC_lov1_mds1_a8c55ce8f1"; /* FIXME */ + char *osc="lov1_UUID"; +// char *mdc="57f5ded574_MDC_lov1_mds1_a8c55ce8f1"; /* FIXME */ + char *mdc="853fe49c56_MDC_lov1_mds1_704cccf8fd"; int err = -EINVAL; ENTRY; -- 1.8.3.1