16 May, 2006

1 commit

  • This patch fixes two problems.

    First, the comparison of entries in the waitq.c was incorrect.

    Second, the NFY_NONE check was incorrect. The test of whether the dentry
    is mounted if ineffective, for example, if an expire fails then we could
    wait forever on a non existant expire. The bug was identified by Jeff
    Moyer.

    The patch changes autofs4 to wait on expires only as this is all that's
    needed. If there is no existing wait when autofs4_wait is call with a type
    of NFY_NONE it delays until either a wait appears or the the expire flag is
    cleared.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     

29 Mar, 2006

2 commits


28 Mar, 2006

19 commits

  • Fix accidental underflow of the atomic counter.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • This functionality is also need for operation of autofs v5 direct mounts.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • We have to have a valid sbi here, or we'd have oopsed already. (There's a
    dereference of sbi->catatonic a few lines above)

    Coverity #740

    Signed-off-by: Dave Jones
    Cc: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • This patch define a new autofs packet for autofs v5 and updates the waitq.c
    functions to handle the additional packet type.

    Signed-off-by: Ian Kent
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • This patch adds expire logic for autofs direct mounts.

    Signed-off-by: Ian Kent
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • This patch adds a follow_link inode method for the root of an autofs direct
    mount trigger. It also adds the corresponding mount options and updates the
    show_mount method.

    Signed-off-by: Ian Kent
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Change the functions may_umount and may_umount_tree to boolean functions to
    aid code readability.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Rename the function simple_empty_nolock to __simple_empty in line with kernel
    naming conventions.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Whitespace and formating changes to waitq code.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Add show_options method to display autofs4 mount options in the proc
    filesystem.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Remove the update of i_atime from autofs4 in favour of having VFS update it.
    i_atime is never used for expire in autofs4.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Alter the expire semantics that define how "busyness" is determined.
    Currently a last_used counter is updated on every revalidate from processes
    other than the mount owner process group.

    This patch changes that so that an expire candidate is busy only if it has a
    reference count greater than the expected minimum, such as when there is an
    open file or working directory in use.

    This method is the only way that busyness can be established for direct mounts
    within the new implementation. For consistency the expire semantic is made
    the same for all mounts.

    A side effect of the patch is that mounts which remain mounted unessessarily
    in the presence of some GUI programs that scan the filesystem should now
    expire.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Fix the case where an expire returns busy on a tree mount when it is in fact
    not busy. This case was overlooked when the patch to prevent the expiring
    away of "scaffolding" directories for tree mounts was applied.

    The problem arises when a tree of mounts is a member of a map with other keys.
    The current logic will not expire the tree if any other mount in the map is
    busy. The solution is to maintain a "minimum" use count for each autofs
    dentry and compare this to the actual dentry usage count during expire.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Simplify the expire tree traversal code by using a function from namespace.c
    to calculate the next entry in the top down tree traversals carried out during
    the expire operation.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Change the names of the boolean functions autofs4_check_mount and
    autofs4_check_tree to autofs4_mount_busy and autofs4_tree_busy respectively
    and alters their return codes to suit in order to aid code readabilty.

    A couple of white space cleanups are included as well.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Addresse a problem where stale dentrys stop mounts from happening.

    When a mount point directory is pre-created and a non-existent entry within it
    is requested a dentry ends up being created within the mount point directory
    which stops future mounts. The problem is solved by ignoring negative,
    unhashed dentrys in the mount point d_subdirs list.

    Additionally the apparent cacheing of -ENOENT returns from requests is
    removed. The test on d_time is a tautology and d_time is not initialised and
    has an unexpected value. In short it doesn't do what it's meant to.

    The cacheing of failed requests to the daemon is important and will be
    followed up later.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Change readdir routines to use the cursor based routines in libfs.c. This
    removes reliance on old readdir code from 2.4 and should improve efficiency of
    readdir in autofs4.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • Whitespace and formating changes to lookup code.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     

23 Mar, 2006

1 commit

  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Acked-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

15 Jan, 2006

1 commit


12 Jan, 2006

1 commit


11 Jan, 2006

1 commit

  • After my lookup_hash patch ->d_revalidate always gets a valid struct nameidata
    passed (unless you use lookup_one_len which autofs4 doesn't), so we can switch
    it from update_atime to touch_atime. This is a bit of an academic excercise
    because autofs has a 1:1 vfsmount superblock relation, but I want to get rid
    of update_atime so filesystems authors can't easily screw up per-mountpoint
    noatime support.

    Signed-off-by: Christoph Hellwig
    Cc: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

10 Jan, 2006

1 commit


09 Jan, 2006

1 commit

  • Some long time ago, dentry struct was carefully tuned so that on 32 bits
    UP, sizeof(struct dentry) was exactly 128, ie a power of 2, and a multiple
    of memory cache lines.

    Then RCU was added and dentry struct enlarged by two pointers, with nice
    results for SMP, but not so good on UP, because breaking the above tuning
    (128 + 8 = 136 bytes)

    This patch reverts this unwanted side effect, by using an union (d_u),
    where d_rcu and d_child are placed so that these two fields can share their
    memory needs.

    At the time d_free() is called (and d_rcu is really used), d_child is known
    to be empty and not touched by the dentry freeing.

    Lockless lookups only access d_name, d_parent, d_lock, d_op, d_flags (so
    the previous content of d_child is not needed if said dentry was unhashed
    but still accessed by a CPU because of RCU constraints)

    As dentry cache easily contains millions of entries, a size reduction is
    worth the extra complexity of the ugly C union.

    Signed-off-by: Eric Dumazet
    Cc: Dipankar Sarma
    Cc: Maneesh Soni
    Cc: Miklos Szeredi
    Cc: "Paul E. McKenney"
    Cc: Ian Kent
    Cc: Paul Jackson
    Cc: Al Viro
    Cc: Christoph Hellwig
    Cc: Trond Myklebust
    Cc: Neil Brown
    Cc: James Morris
    Cc: Stephen Smalley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     

07 Nov, 2005

1 commit

  • This is the fs/ part of the big kfree cleanup patch.

    Remove pointless checks for NULL prior to calling kfree() in fs/.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     

20 Aug, 2005

1 commit

  • This fixes up the symlink functions for the calling convention change:

    * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs,
    smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link()
    * befs, smbfs, xfs - same for ->put_link()

    Signed-off-by: Linus Torvalds

    Al Viro
     

28 Jul, 2005

1 commit


08 Jul, 2005

1 commit


22 Jun, 2005

3 commits

  • For browsable autofs maps, a mount request that arrives at the same time an
    expire is happening can fail to perform the needed mount.

    This happens becuase the directory exists and so the revalidate succeeds when
    we need it to fail so that lookup is called on the same dentry to do the
    mount. Instead lookup is called on the next path component which should be
    whithin the mount, but the parent isn't mounted.

    The solution is to allow the revalidate to continue and perform the mount as
    no directory creation (at mount time) is needed for browsable mount entries.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • At the tail end of an expire it's possible for a process to enter
    autofs4_wait, with a waitq type of NFY_NONE but find that the expire is
    finished. In this cause autofs4_wait will try to create a new wait but not
    notify the daemon leading to a hang. As the wait type is meant to delay mount
    requests from revalidate or lookup during an expire and the expire is done all
    we need to do is check if the dentry is a mountpoint. If it's not then we're
    done.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • While this is not a solution to bind and move mounts on autofs owned
    directories it is necessary to fix the trady error handling.

    At least it avoids the kernel panic I observed checking out bug #4589.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     

01 May, 2005

2 commits

  • For tree mount maps, a call to chdir or chroot, to a directory above the
    moint point directories at a certain time during the expire results in the
    expire incorrectly thinking the tree is not busy. This patch adds a check
    to see if the filesystem above the tree mount points is busy and also locks
    the filesystem during the tree mount expire to prevent the race.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     
  • It's possible for an event wait request to arive before the event
    requestor. If this happens the daemon never gets notified and autofs
    hangs.

    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds