From: Thomas Veerman Date: Thu, 9 Feb 2012 16:33:24 +0000 (+0000) Subject: AVFS/APFS: small cleanup X-Git-Tag: v3.2.0~80 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/migration-4to9?a=commitdiff_plain;h=972a7918823cb97caa1dc01226567262db5ed51e;p=minix.git AVFS/APFS: small cleanup --- diff --git a/servers/apfs/main.c b/servers/apfs/main.c index 8669c7f79..f4f20f8dd 100644 --- a/servers/apfs/main.c +++ b/servers/apfs/main.c @@ -36,7 +36,6 @@ PUBLIC int main(int argc, char *argv[]) env_setargs(argc, argv); sef_local_startup(); - printf("Started APFS\n"); while(!unmountdone || !exitsignaled) { endpoint_t src; diff --git a/servers/avfs/filedes.c b/servers/avfs/filedes.c index 681030623..1d3cbc076 100644 --- a/servers/avfs/filedes.c +++ b/servers/avfs/filedes.c @@ -121,7 +121,6 @@ PUBLIC int get_fd(int start, mode_t bits, int *k, struct filp **fpt) for (f = &filp[0]; f < &filp[NR_FILPS]; f++) { assert(f->filp_count >= 0); if (f->filp_count == 0 && mutex_trylock(&f->filp_lock) == 0) { - if (verbose) printf("get_fd: locking filp=%p\n", f); f->filp_mode = bits; f->filp_pos = cvu64(0); f->filp_selectors = 0; @@ -253,10 +252,6 @@ tll_access_t locktype; vp = filp->filp_vno; assert(vp != NULL); - if (verbose) - printf("lock_filp: filp=%p locking vnode %p with locktype %d\n", filp, - vp, locktype); - /* Lock vnode only if we haven't already locked it. If already locked by us, * we're allowed to have one additional 'soft' lock. */ if (tll_locked_by_me(&vp->v_lock)) { diff --git a/servers/avfs/glo.h b/servers/avfs/glo.h index 931c68c33..c07220aa0 100644 --- a/servers/avfs/glo.h +++ b/servers/avfs/glo.h @@ -36,7 +36,6 @@ EXTERN message m_out; /* the output message used for reply */ # define scratch(p) (scratchpad[((int) ((p) - fproc))]) EXTERN struct worker_thread *self; EXTERN int force_sync; /* toggle forced synchronous communication */ -EXTERN int verbose; 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 68ccda822..337cc8383 100644 --- a/servers/avfs/main.c +++ b/servers/avfs/main.c @@ -80,7 +80,6 @@ PUBLIC int main(void) sef_local_startup(); printf("Started AVFS: %d worker thread(s)\n", NR_WTHREADS); - verbose = 0; /* This is the main loop that gets work, processes it, and sends replies. */ while (TRUE) { @@ -261,7 +260,6 @@ PRIVATE void *do_fs_reply(struct job *job) struct vmnt *vmp; struct fproc *rfp; - if (verbose) printf("VFS: reply to request!\n"); if ((vmp = find_vmnt(who_e)) == NULL) panic("Couldn't find vmnt for endpoint %d", who_e); @@ -668,9 +666,6 @@ PRIVATE void thread_cleanup_f(struct fproc *rfp, char *f, int l) /* Clean up worker thread. Skip parts if this thread is not associated * with a particular process (i.e., rfp is NULL) */ - if (verbose) printf("AVFS: thread %d is cleaning up for fp=%p (%s:%d)\n", - mthread_self(), rfp, f, l); - assert(mthread_self() != -1); #if LOCK_DEBUG @@ -716,8 +711,6 @@ PRIVATE void get_work() int r, found_one, proc_p; register struct fproc *rp; - if (verbose) printf("VFS: get_work looking for work\n"); - while (reviving != 0) { found_one = FALSE; @@ -746,9 +739,6 @@ PRIVATE void get_work() if (m_in.m_type == EDEADSRCDST) return; /* Failed 'sendrec' */ - if (verbose) printf("AVFS: got work from %d (fp=%p)\n", m_in.m_source, - fp); - /* Negative who_p is never used to access the fproc array. Negative * numbers (kernel tasks) are treated in a special way. */ @@ -857,7 +847,6 @@ PRIVATE void service_pm() { int r, slot; - if (verbose) printf("service_pm: %d (%d)\n", call_nr, mthread_self()); switch (call_nr) { case PM_SETUID: pm_setuid(m_in.PM_PROC, m_in.PM_EID, m_in.PM_RID); diff --git a/servers/avfs/mount.c b/servers/avfs/mount.c index 36853ccbd..4e4666d5a 100644 --- a/servers/avfs/mount.c +++ b/servers/avfs/mount.c @@ -238,7 +238,7 @@ char mount_label[LABEL_MAX] ) } /* We'll need a vnode for the root inode */ - if ((root_node = get_free_vnode()) == NULL || dev == 266) { + if ((root_node = get_free_vnode()) == NULL) { if (vp != NULL) { unlock_vnode(vp); put_vnode(vp); diff --git a/servers/avfs/tll.c b/servers/avfs/tll.c index bf728e880..b98876596 100644 --- a/servers/avfs/tll.c +++ b/servers/avfs/tll.c @@ -50,11 +50,6 @@ PRIVATE int tll_append(tll_t *tllp, tll_access_t locktype) tllp->t_owner = NULL; } - if (verbose) { - printf("got lock on tllp=%p with type %d (self=%p)\n", tllp, - locktype, self); - } - /* Due to the way upgrading and downgrading works, read-only requests are * scheduled to run after a downgraded lock is released (because they are * queued on the write-only queue which has priority). This results from the