21 Feb, 2007

1 commit

  • Jeff Moyer has identified a race between mount and expire.

    What happens is that during an expire the situation can arise that a directory
    is removed and another lookup is done before the expire issues a completion
    status to the kernel module. In this case, since the the lookup gets a new
    dentry, it doesn't know that there is an expire in progress and when it posts
    its mount request, matches the existing expire request and waits for its
    completion. ENOENT is then returned to user space from lookup (as the dentry
    passed in is now unhashed) without having performed the mount request.

    The solution used here is to keep track of dentrys in this unhashed state and
    reuse them, if possible, in order to preserve the flags. Additionally, this
    infrastructure will provide the framework for the reintroduction of caching of
    mount fails removed earlier in development.

    Signed-off-by: Ian Kent
    Acked-by: Jeff Moyer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Kent
     

13 Feb, 2007

1 commit

  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

09 Dec, 2006

1 commit


12 Oct, 2006

1 commit

  • Make sure all dentries refs are released before calling kill_anon_super() so
    that the assumption that generic_shutdown_super() can completely destroy the
    dentry tree for there will be no external references holds true.

    What was being done in the put_super() superblock op, is now done in the
    kill_sb() filesystem op instead, prior to calling kill_anon_super().

    This makes the struct autofs_sb_info::root member variable redundant (since
    sb->s_root is still available), and so that is removed. The calls to
    shrink_dcache_sb() are also removed since they're also redundant as
    shrink_dcache_for_umount() will now be called after the cleanup routine.

    Signed-off-by: David Howells
    Acked-by: Ian Kent
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

24 Sep, 2006

1 commit


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

8 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
     
  • 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 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
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     

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
     

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
     

28 Jul, 2005

1 commit


22 Jun, 2005

1 commit


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