From: tianzy Date: Wed, 8 Oct 2008 10:48:33 +0000 (+0000) Subject: Branch b1_8_gate X-Git-Tag: v1_7_140~2^279 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6dc60a53238d144ab8fb5ad8d286c2cd2423e764;p=fs%2Flustre-release.git Branch b1_8_gate fix panic on debug_daemon b=15878 i=shadow i=zhenyu.xu --- diff --git a/lnet/libcfs/tracefile.c b/lnet/libcfs/tracefile.c index 35655d9..69d53ee 100644 --- a/lnet/libcfs/tracefile.c +++ b/lnet/libcfs/tracefile.c @@ -827,7 +827,9 @@ int trace_daemon_command(char *str) tracefile_write_lock(); if (strcmp(str, "stop") == 0) { + tracefile_write_unlock(); trace_stop_thread(); + tracefile_write_lock(); memset(tracefile, 0, sizeof(tracefile)); } else if (strncmp(str, "size=", 5) == 0) { @@ -1020,6 +1022,25 @@ static int tracefiled(void *arg) cfs_filp_close(filp); put_pages_on_daemon_list(&pc); + if (!list_empty(&pc.pc_pages)) { + int i; + + printk(KERN_ALERT "Lustre: trace pages aren't empty\n"); + printk(KERN_ALERT "total cpus(%d): ", num_possible_cpus()); + for (i = 0; i < num_possible_cpus(); i++) + if (cpu_online(i)) + printk(KERN_ALERT "%d(on) ", i); + else + printk(KERN_ALERT "%d(off) ", i); + printk(KERN_ALERT "\n"); + + i = 0; + list_for_each_entry_safe(tage, tmp, &pc.pc_pages, + linkage) + printk(KERN_ALERT "page %d belongs to cpu %d\n", + ++i, tage->cpu); + printk(KERN_ALERT "There are %d pages unwritten\n", i); + } __LASSERT(list_empty(&pc.pc_pages)); } complete(&tctl->tctl_stop);