AVFS/APFS: small cleanup

This commit is contained in:
Thomas Veerman 2012-02-09 16:33:24 +00:00
parent abd6043a2f
commit 972a791882
6 changed files with 1 additions and 24 deletions

View file

@ -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;

View file

@ -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)) {

View file

@ -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 */

View file

@ -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);

View file

@ -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);

View file

@ -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