From dd22c7119b10e6b4bcaea41bc5b2f9905eea1388 Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 26 Jun 2006 08:06:14 +0000 Subject: [PATCH] - trivial fixes in mdd; - added fld "targets" procfs entry to see what MDT targets fld does work with and send RPCs to. --- lustre/fld/lproc_fld.c | 27 +++++++++++++++++++++++++++ lustre/mdd/mdd_lov.c | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lustre/fld/lproc_fld.c b/lustre/fld/lproc_fld.c index e9820c2..ec4d6f9 100644 --- a/lustre/fld/lproc_fld.c +++ b/lustre/fld/lproc_fld.c @@ -48,9 +48,36 @@ #include "fld_internal.h" #ifdef LPROCFS +static int +fld_proc_read_targets(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + struct lu_client_fld *fld = (struct lu_client_fld *)data; + struct obd_export *fld_exp; + int total = 0, rc; + ENTRY; + + LASSERT(fld != NULL); + + spin_lock(&fld->fld_lock); + list_for_each_entry(fld_exp, + &fld->fld_exports, exp_fld_chain) { + rc = snprintf(page, count, "%s\n", + fld_exp->exp_client_uuid.uuid); + page += rc; + count -= rc; + total += rc; + if (count == 0) + break; + } + spin_unlock(&fld->fld_lock); + RETURN(total); +} + struct lprocfs_vars fld_server_proc_list[] = { { NULL }}; struct lprocfs_vars fld_client_proc_list[] = { + { "targets", fld_proc_read_targets, NULL, NULL }, { NULL }}; #endif diff --git a/lustre/mdd/mdd_lov.c b/lustre/mdd/mdd_lov.c index 253a89d..0716da6 100644 --- a/lustre/mdd/mdd_lov.c +++ b/lustre/mdd/mdd_lov.c @@ -330,11 +330,13 @@ int mdd_lov_init(const struct lu_context *ctxt, struct mdd_device *mdd, rc = mdd_lov_connect(ctxt, mdd, lov_name); if (rc) GOTO(out, rc); + EXIT; out: if (rc) mdd_lov_fini(ctxt, mdd); - RETURN(rc); + return rc; } +EXPORT_SYMBOL(mdd_lov_init); /* update the LOV-OSC knowledge of the last used object id's */ int mdd_lov_set_nextid(struct mdd_device *mdd) -- 1.8.3.1