Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1735 ptlrpc: only set jobid if not already set
[fs/lustre-release.git]
/
lustre
/
obdclass
/
llog_test.c
diff --git
a/lustre/obdclass/llog_test.c
b/lustre/obdclass/llog_test.c
index
ce887c8
..
00678c2
100644
(file)
--- a/
lustre/obdclass/llog_test.c
+++ b/
lustre/obdclass/llog_test.c
@@
-1,6
+1,4
@@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@
-26,7
+24,7
@@
* GPL HEADER END
*/
/*
* GPL HEADER END
*/
/*
- * Copyright
2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright
(c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
* Use is subject to license terms.
*/
/*
@@
-38,9
+36,6
@@
* Author: Phil Schwan <phil@clusterfs.com>
*/
* Author: Phil Schwan <phil@clusterfs.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_CLASS
#include <linux/module.h>
#define DEBUG_SUBSYSTEM S_CLASS
#include <linux/module.h>
@@
-517,11
+512,13
@@
static int llog_test_6(struct obd_device *obd, char *name)
rc = obd_connect(NULL, &exp, mgc_obd, &uuid,
NULL /* obd_connect_data */, NULL);
rc = obd_connect(NULL, &exp, mgc_obd, &uuid,
NULL /* obd_connect_data */, NULL);
- if (rc) {
- CERROR("6: failed to connect to MGC: %s\n", mgc_obd->obd_name);
- GOTO(ctxt_release, rc);
+ if (rc != -EALREADY) {
+ CERROR("6: connect on connected MDC (%s) failed to return"
+ " -EALREADY", mgc_obd->obd_name);
+ if (rc == 0)
+ obd_disconnect(exp);
+ GOTO(ctxt_release, rc = -EINVAL);
}
}
- LASSERTF(exp->exp_obd == mgc_obd, "%p - %p - %p\n", exp, exp->exp_obd, mgc_obd);
nctxt = llog_get_context(mgc_obd, LLOG_CONFIG_REPL_CTXT);
rc = llog_create(nctxt, &llh, NULL, name);
nctxt = llog_get_context(mgc_obd, LLOG_CONFIG_REPL_CTXT);
rc = llog_create(nctxt, &llh, NULL, name);
@@
-551,9
+548,6
@@
parse_out:
if (rc) {
CERROR("6: llog_close failed: rc = %d\n", rc);
}
if (rc) {
CERROR("6: llog_close failed: rc = %d\n", rc);
}
- CDEBUG(D_INFO, "obd %p - %p - %p - %p\n",
- mgc_obd, exp, exp->exp_obd, exp->exp_obd->obd_type);
- rc = obd_disconnect(exp);
ctxt_release:
llog_ctxt_put(ctxt);
RETURN(rc);
ctxt_release:
llog_ctxt_put(ctxt);
RETURN(rc);
@@
-659,8
+653,7
@@
static int llog_run_tests(struct obd_device *obd)
static int llog_test_llog_init(struct obd_device *obd,
struct obd_llog_group *olg,
static int llog_test_llog_init(struct obd_device *obd,
struct obd_llog_group *olg,
- struct obd_device *tgt, int count,
- struct llog_catid *logid, struct obd_uuid *uuid)
+ struct obd_device *tgt, int *index)
{
int rc;
ENTRY;
{
int rc;
ENTRY;
@@
-716,6
+709,7
@@
static int llog_test_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
RETURN(-EINVAL);
}
RETURN(-EINVAL);
}
+ /* disk obd */
tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
CERROR("target device not attached or not set up (%s)\n",
tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
CERROR("target device not attached or not set up (%s)\n",
@@
-723,11
+717,11
@@
static int llog_test_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
RETURN(-EINVAL);
}
RETURN(-EINVAL);
}
- rc = obd_llog_init(obd, NULL, tgt,
0, NULL,
NULL);
+ rc = obd_llog_init(obd, NULL, tgt, NULL);
if (rc)
RETURN(rc);
if (rc)
RETURN(rc);
- llog_test_rand =
ll
_rand();
+ llog_test_rand =
cfs
_rand();
rc = llog_run_tests(obd);
if (rc)
rc = llog_run_tests(obd);
if (rc)