Re: [patch] autofs4 in 2.4.0 doesn't expire

From: Dick Streefland (dick_streefland@tasking.com)
Date: Thu Jul 06 2000 - 11:38:57 EST


On Monday 2000-07-03 17:48, Dick Streefland wrote:
| The expiration in autofs v4 of the 2.4.0 kernels doesn't seem to work.
| I'm using kernel 2.4.0-test3-pre2 with autofs4 and autofs-4.0.0pre7.
| After turning on debugging output, I found out that expiration doesn't
| work because is_tree_busy() always returns 1, even if the filesystem
| is not in use. I suspect that the busy count calculation is incorrect.
| The patch below changes this, so that both single mounts, and tree
| mounts will now unmount correctly. However, there is still a problem
| with a local mount: the symlink that is created instead of the NFS
| mount is not expired.

Here is an updated version of my patch that also handles the case where
a host does not export the root, but only subdirectories. I've worked
around the symlink problem by using the "nosymlink" option.

-- 
Dick Streefland                      ////            TASKING Software BV
dick_streefland@tasking.com         (@ @)         http://www.tasking.com
--------------------------------oOO--(_)--OOo---------------------------

--- linux/fs/autofs4/expire.c.orig Mon May 8 20:17:47 2000 +++ linux/fs/autofs4/expire.c Thu Jul 6 18:10:17 2000 @@ -22,7 +22,9 @@ struct list_head *next; int count; - count = atomic_read(&mnt->mnt_count); + count = atomic_read(&mnt->mnt_count) - 2; + if (!is_autofs4_dentry(mnt->mnt_mountpoint)) + count--; repeat: next = this_parent->mnt_mounts.next; resume: @@ -32,7 +34,7 @@ mnt_child); next = tmp->next; /* Decrement count for unused children */ - count += atomic_read(&p->mnt_count) - 1; + count += atomic_read(&p->mnt_count) - 2; if (!list_empty(&p->mnt_mounts)) { this_parent = p; goto repeat;

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:19 EST