From 7d4d6dc31d8e3d8dfc7c33d9130a8c66573e4b60 Mon Sep 17 00:00:00 2001 From: niu Date: Fri, 9 Jan 2004 07:02:30 +0000 Subject: [PATCH] b: 1963 The tag name is b_localprc NOT b_localrpc, sorry for make this mistake. Following is description for how to trace the bug of local rpc in uml. * create tag b_localprc and commit in localrpc patch for test and debug. * How to active localrpc? Run lctl, then select MDT device, then 'probe 8'. thus some requests form MDC to MDT will go through local rpc. * How to repeat the bug? Startup Lustre in uml by llmount.sh, then run tests/localrpc_test.sh. * Process local rpc request in another thread. Comment off the SAME_THREAD in ptlrpc_local.c will make service hander of local rpc be executed in another thread, this way can pass test 99. * For debug, I disabled all other local rpc request except the LDLM_ENQUEUE requests sent via ptlrpc_queue_wait. --- lustre/utils/obd.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index bdd533a..70ac8a4 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -547,9 +547,25 @@ int jt_obd_device(int argc, char **argv) return rc; } -int jt_obd_connect(int argc, char **argv) +int jt_obd_probe(int argc, char **argv) { - return 0; + struct obd_ioctl_data data; + int rc; + + if (argc != 2) + return CMD_HELP; + + IOC_INIT(data); + data.ioc_inllen1 = strlen(argv[1]) + 1; + data.ioc_inlbuf1 = argv[1]; + IOC_PACK(argv[0], data); + + rc = l_ioctl(OBD_DEV_ID, OBD_IOC_PROBE, buf); + if (rc) + fprintf(stderr, "OBD_IOC_PROBE failed: %s\n", + strerror(errno)); + + return rc; } int jt_obd_disconnect(int argc, char **argv) -- 1.8.3.1