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
- documentation update for MDS recovery
[fs/lustre-release.git]
/
lustre
/
osc
/
osc_request.c
diff --git
a/lustre/osc/osc_request.c
b/lustre/osc/osc_request.c
index
aca92f1
..
7b33e6c
100644
(file)
--- a/
lustre/osc/osc_request.c
+++ b/
lustre/osc/osc_request.c
@@
-20,7
+20,6
@@
#define DEBUG_SUBSYSTEM S_OSC
#include <linux/module.h>
#define DEBUG_SUBSYSTEM S_OSC
#include <linux/module.h>
-#include <linux/random.h>
#include <linux/lustre_dlm.h>
#include <linux/obd_ost.h>
#include <linux/lustre_dlm.h>
#include <linux/obd_ost.h>
@@
-457,7
+456,7
@@
int osc_brw_read(struct obd_conn *conn, obd_count num_oa, struct obdo **oa,
if (bulk[pages] == NULL)
continue;
kunmap(buf[pages]);
if (bulk[pages] == NULL)
continue;
kunmap(buf[pages]);
-
OBD_FREE(bulk[pages], sizeof(**bulk)
);
+
ptlrpc_free_bulk(bulk[pages]
);
}
}
}
}
@@
-558,7
+557,6
@@
int osc_brw(int rw, struct obd_conn *conn, obd_count num_oa,
static int osc_setup(struct obd_device *obddev, obd_count len, void *buf)
{
struct osc_obd *osc = &obddev->u.osc;
static int osc_setup(struct obd_device *obddev, obd_count len, void *buf)
{
struct osc_obd *osc = &obddev->u.osc;
- __u32 ns_id;
int rc;
ENTRY;
int rc;
ENTRY;
@@
-574,24
+572,14
@@
static int osc_setup(struct obd_device *obddev, obd_count len, void *buf)
if (osc->osc_ldlm_client == NULL)
GOTO(out_client, rc = -ENOMEM);
if (osc->osc_ldlm_client == NULL)
GOTO(out_client, rc = -ENOMEM);
- ptlrpc_init_client(NULL, OST_REQUEST_PORTAL, OSC_REPLY_PORTAL,
+ ptlrpc_init_client(NULL,
NULL,
OST_REQUEST_PORTAL, OSC_REPLY_PORTAL,
osc->osc_client);
osc->osc_client);
- ptlrpc_init_client(NULL, LDLM_REQUEST_PORTAL, LDLM_REPLY_PORTAL,
+ ptlrpc_init_client(NULL,
NULL,
LDLM_REQUEST_PORTAL, LDLM_REPLY_PORTAL,
osc->osc_ldlm_client);
osc->osc_ldlm_client);
- get_random_bytes(&ns_id, sizeof(ns_id));
- rc = ldlm_cli_namespace_new(obddev, osc->osc_ldlm_client, osc->osc_conn,
- ns_id);
- if (rc) {
- CERROR("Couldn't create new namespace %u: %d\n", ns_id, rc);
- GOTO(out_ldlm_client, rc);
- }
-
MOD_INC_USE_COUNT;
RETURN(0);
MOD_INC_USE_COUNT;
RETURN(0);
- out_ldlm_client:
- OBD_FREE(osc->osc_ldlm_client, sizeof(*osc->osc_ldlm_client));
out_client:
OBD_FREE(osc->osc_client, sizeof(*osc->osc_client));
out_conn:
out_client:
OBD_FREE(osc->osc_client, sizeof(*osc->osc_client));
out_conn:
@@
-603,7
+591,9
@@
static int osc_cleanup(struct obd_device * obddev)
{
struct osc_obd *osc = &obddev->u.osc;
{
struct osc_obd *osc = &obddev->u.osc;
+ ptlrpc_cleanup_client(osc->osc_client);
OBD_FREE(osc->osc_client, sizeof(*osc->osc_client));
OBD_FREE(osc->osc_client, sizeof(*osc->osc_client));
+ ptlrpc_cleanup_client(osc->osc_ldlm_client);
OBD_FREE(osc->osc_ldlm_client, sizeof(*osc->osc_ldlm_client));
ptlrpc_put_connection(osc->osc_conn);
OBD_FREE(osc->osc_ldlm_client, sizeof(*osc->osc_ldlm_client));
ptlrpc_put_connection(osc->osc_conn);