* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
/* Passed as data param to class_config_parse_llog */
struct config_llog_instance {
- char * cfg_instance;
char * cfg_obdname;
+ char cfg_instance[sizeof(void*) * 2 + 1];
struct super_block *cfg_sb;
struct obd_uuid cfg_uuid;
int cfg_last_idx; /* for partial llog processing */
RETURN(rc);
}
+static inline void obd_cleanup_client_import(struct obd_device *obd)
+{
+ ENTRY;
+
+ /* If we set up but never connected, the
+ client import will not have been cleaned. */
+ cfs_down_write(&obd->u.cli.cl_sem);
+ if (obd->u.cli.cl_import) {
+ struct obd_import *imp;
+ imp = obd->u.cli.cl_import;
+ CDEBUG(D_CONFIG, "%s: client import never connected\n",
+ obd->obd_name);
+ ptlrpc_invalidate_import(imp);
+ if (imp->imp_rq_pool) {
+ ptlrpc_free_rq_pool(imp->imp_rq_pool);
+ imp->imp_rq_pool = NULL;
+ }
+ class_destroy_import(imp);
+ obd->u.cli.cl_import = NULL;
+ }
+ cfs_up_write(&obd->u.cli.cl_sem);
+
+ EXIT;
+}
+
static inline int
obd_process_config(struct obd_device *obd, int datalen, void *data)
{
static inline int md_readpage(struct obd_export *exp, const struct lu_fid *fid,
struct obd_capa *oc, __u64 offset,
- struct page *page,
+ struct page **pages, unsigned npages,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, readpage);
EXP_MD_COUNTER_INCREMENT(exp, readpage);
- rc = MDP(exp->exp_obd, readpage)(exp, fid, oc, offset, page, request);
+ rc = MDP(exp->exp_obd, readpage)(exp, fid, oc, offset, pages, npages,
+ request);
RETURN(rc);
}