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-744 osc: add lru pages management - new RPC
[fs/lustre-release.git]
/
lustre
/
lov
/
lov_obd.c
diff --git
a/lustre/lov/lov_obd.c
b/lustre/lov/lov_obd.c
index
098bce5
..
207f39c
100644
(file)
--- a/
lustre/lov/lov_obd.c
+++ b/
lustre/lov/lov_obd.c
@@
-61,6
+61,7
@@
#include <lprocfs_status.h>
#include <lustre_param.h>
#include <cl_object.h>
#include <lprocfs_status.h>
#include <lustre_param.h>
#include <cl_object.h>
+#include <lclient.h> /* for cl_client_lru */
#include <lustre/ll_fiemap.h>
#include <lustre_log.h>
#include <lustre/ll_fiemap.h>
#include <lustre_log.h>
@@
-636,6
+637,15
@@
static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
if (!tgt->ltd_exp)
GOTO(out, rc = 0);
if (!tgt->ltd_exp)
GOTO(out, rc = 0);
+ if (lov->lov_lru != NULL) {
+ rc = obd_set_info_async(NULL, tgt->ltd_exp,
+ sizeof(KEY_LRU_SET), KEY_LRU_SET,
+ sizeof(struct cl_client_lru), lov->lov_lru,
+ NULL);
+ if (rc < 0)
+ GOTO(out, rc);
+ }
+
rc = lov_notify(obd, tgt->ltd_exp->exp_obd,
active ? OBD_NOTIFY_CONNECT : OBD_NOTIFY_INACTIVE,
(void *)&index);
rc = lov_notify(obd, tgt->ltd_exp->exp_obd,
active ? OBD_NOTIFY_CONNECT : OBD_NOTIFY_INACTIVE,
(void *)&index);
@@
-2707,7
+2717,11
@@
static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp,
mds_con = 1;
} else if (KEY_IS(KEY_CAPA_KEY)) {
capa = 1;
mds_con = 1;
} else if (KEY_IS(KEY_CAPA_KEY)) {
capa = 1;
- }
+ } else if (KEY_IS(KEY_LRU_SET)) {
+ LASSERT(lov->lov_lru == NULL);
+ lov->lov_lru = val;
+ do_inactive = 1;
+ }
for (i = 0; i < count; i++, val = (char *)val + incr) {
if (next_id) {
for (i = 0; i < count; i++, val = (char *)val + incr) {
if (next_id) {