From a8a4993749dbcd583037a359eb5fa9ea0d69f050 Mon Sep 17 00:00:00 2001 From: wangdi Date: Wed, 29 Nov 2006 09:44:34 +0000 Subject: [PATCH] Branch:b_new_cmd add evict_client proc for mdt --- lustre/mdt/mdt_lproc.c | 16 ++++++++++++++++ lustre/tests/test-framework.sh | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lustre/mdt/mdt_lproc.c b/lustre/mdt/mdt_lproc.c index 8bdedfb..3fd89ec 100644 --- a/lustre/mdt/mdt_lproc.c +++ b/lustre/mdt/mdt_lproc.c @@ -756,6 +756,21 @@ static int lprocfs_wr_ck_timeout(struct file *file, const char *buffer, return count; } +static int lprocfs_mdt_wr_evict_client(struct file *file, const char *buffer, + unsigned long count, void *data) +{ + char tmpbuf[sizeof(struct obd_uuid)]; + + sscanf(buffer, "%40s", tmpbuf); + + if (strncmp(tmpbuf, "nid:", 4) != 0) + return lprocfs_wr_evict_client(file, buffer, count, data); + + CERROR("NOT implement evict client by nid %s\n", tmpbuf); + + return count; +} + static struct lprocfs_vars lprocfs_mdt_obd_vars[] = { { "uuid", lprocfs_rd_uuid, 0, 0 }, { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 }, @@ -789,6 +804,7 @@ static struct lprocfs_vars lprocfs_mdt_obd_vars[] = { lprocfs_wr_ck_timeout, 0 }, { "capa_count", lprocfs_rd_capa_count, 0, 0 }, { "site_stats", lprocfs_rd_site_stats, 0, 0 }, + { "evict_client", 0, lprocfs_mdt_wr_evict_client, 0 }, { 0 } }; diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index e6b8dcf..5ecada7 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -498,7 +498,7 @@ replay_barrier_nodf() { mds_evict_client() { UUID=`cat /proc/fs/lustre/mdc/${mds1_svc}-mdc-*/uuid` - do_facet mds1 "echo $UUID > /proc/fs/lustre/mdd/${mds1_svc}/evict_client" + do_facet mds1 "echo $UUID > /proc/fs/lustre/mdt/${mds1_svc}/evict_client" } ost_evict_client() { -- 1.8.3.1