From: Thomas Veerman Date: Mon, 22 Aug 2011 13:24:35 +0000 (+0000) Subject: Turn off block read debugs and turn on mount debugs X-Git-Tag: v3.2.0~337 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/rndc-confgen.html?a=commitdiff_plain;h=e09714ab537fe73bc9731506722c02afba0b7e41;p=minix.git Turn off block read debugs and turn on mount debugs --- diff --git a/servers/avfs/glo.h b/servers/avfs/glo.h index ed50c1b5a..df8d772cd 100644 --- a/servers/avfs/glo.h +++ b/servers/avfs/glo.h @@ -37,6 +37,8 @@ EXTERN struct worker_thread *self; EXTERN endpoint_t receive_from;/* endpoint with pending reply */ EXTERN int force_sync; /* toggle forced synchronous communication */ EXTERN int verbose; +EXTERN int verbose2; +EXTERN endpoint_t verbose_e; EXTERN int deadlock_resolving; EXTERN mutex_t exec_lock; EXTERN mutex_t bsf_lock;/* Global lock for access to block special files */ diff --git a/servers/avfs/main.c b/servers/avfs/main.c index 0f70e41dd..04be3bd75 100644 --- a/servers/avfs/main.c +++ b/servers/avfs/main.c @@ -79,6 +79,8 @@ PUBLIC int main(void) printf("Started AVFS\n"); verbose = 0; + verbose2 = 0; + verbose_e = NONE; /* This is the main loop that gets work, processes it, and sends replies. */ while (TRUE) { @@ -385,7 +387,7 @@ PRIVATE void *do_work(void *arg) lock_proc(fp, 0); /* This proc is busy */ - if (verbose) { + if (verbose2 && who_e == verbose_e) { printf("Doing call_nr = %d for %d\n", call_nr, who_e); } diff --git a/servers/avfs/mount.c b/servers/avfs/mount.c index 32f53ff55..bc730fd2e 100644 --- a/servers/avfs/mount.c +++ b/servers/avfs/mount.c @@ -152,7 +152,11 @@ PUBLIC int do_mount() return(err_code); /* Do the actual job */ + verbose2 = 1; + verbose_e = fs_e; r = mount_fs(dev, fullpath, fs_e, rdonly, mount_label); + verbose2 = 0; + verbose_e = NONE; return(r); } diff --git a/servers/avfs/read.c b/servers/avfs/read.c index 8de5eeb86..ffde1f9db 100644 --- a/servers/avfs/read.c +++ b/servers/avfs/read.c @@ -137,17 +137,12 @@ int rw_flag; /* READING or WRITING */ } else if (block_spec) { /* Block special files. */ lock_bsf(); - printf("Doing block read_write(%d) from dev %d/ep=%d\n", - rw_flag == READING, - vp->v_sdev, vp->v_bfs_e); r = req_breadwrite(vp->v_bfs_e, who_e, vp->v_sdev, position, m_in.nbytes, m_in.buffer, rw_flag, &res_pos, &res_cum_io); if (r == OK) { - printf("OK res_cum_io = %d\n", res_cum_io); position = res_pos; cum_io += res_cum_io; - } else - printf("Failed with %d\n", r); + } unlock_bsf(); } else { /* Regular files */