28 Aug, 2009

1 commit

  • In commit a5a0a630922a2f6a774b6dac19f70cb5abd86bb0, when
    ocfs2_attch_dentry_lock fails, we call an extra iput and reset
    dentry->d_fsdata to NULL. This resolve a bug, but it isn't
    completed and the dentry is still there. When we want to use
    it again, ocfs2_dentry_revalidate doesn't catch it and return
    true. That make future ocfs2_dentry_lock panic out.
    One bug is http://oss.oracle.com/bugzilla/show_bug.cgi?id=1162.

    The resolution is to add a check for dentry->d_fsdata in
    revalidate process and return false if dentry->d_fsdata is NULL,
    so that a new ocfs2_lookup will be called again.

    Signed-off-by: Tao Ma
    Signed-off-by: Joel Becker

    Tao Ma
     

22 Jul, 2009

1 commit

  • In commit ea455f8ab68338ba69f5d3362b342c115bea8e13, we moved the dentry lock
    put process into ocfs2_wq. This causes problems during umount because ocfs2_wq
    can drop references to inodes while they are being invalidated by
    invalidate_inodes() causing all sorts of nasty things (invalidate_inodes()
    ending in an infinite loop, "Busy inodes after umount" messages etc.).

    We fix the problem by stopping ocfs2_wq from doing any further releasing of
    inode references on the superblock being unmounted, wait until it finishes
    the current round of releasing and finally cleaning up all the references in
    dentry_lock_list from ocfs2_put_super().

    The issue was tracked down by Tao Ma .

    Signed-off-by: Jan Kara
    Signed-off-by: Joel Becker

    Jan Kara
     

24 Apr, 2009

1 commit

  • In ocfs2_dentry_attach_lock(), if unable to get the dentry lock, we need to
    call iput(inode) because a failure here means no d_instantiate(), which means
    the normally matching iput() will not be called during dput(dentry).

    This patch fixes the oops that accompanies the following message:
    (3996,1):dlm_empty_lockres:2708 ERROR: lockres W00000000000000000a1046b06a4382 still has local locks!
    kernel BUG in dlm_empty_lockres at /rpmbuild/smushran/BUILD/ocfs2-1.4.2/fs/ocfs2/dlm/dlmmaster.c:2709!

    Signed-off-by: Sunil Mushran
    Signed-off-by: Joel Becker

    Sunil Mushran
     

28 Mar, 2009

1 commit


03 Feb, 2009

1 commit

  • Dropping of last reference to dentry lock is a complicated operation involving
    dropping of reference to inode. This can get complicated and quota code in
    particular needs to obtain some quota locks which leads to potential deadlock.
    Thus we defer dropping of inode reference to ocfs2_wq.

    Signed-off-by: Jan Kara
    Signed-off-by: Mark Fasheh

    Jan Kara
     

26 Jan, 2008

1 commit

  • The node maps that are set/unset by these votes are no longer relevant, thus
    we can remove the mount and umount votes. Since those are the last two
    remaining votes, we can also remove the entire vote infrastructure.

    The vote thread has been renamed to the downconvert thread, and the small
    amount of functionality related to managing it has been moved into
    fs/ocfs2/dlmglue.c. All references to votes have been removed or updated.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

28 Nov, 2007

1 commit

  • The existing bug statement didn't take into account unhashed dentries which
    might not have a cluster lock on them. This could happen if a node exporting
    the file system via NFS is rebooted, re-exported to nfs clients and then
    unmounted. It's fine in this case to not have a dentry cluster lock.

    Just remove the bug statement and replace it with an error print, which
    does the proper checks. Though we want to know if something has happened
    which might have prevented a cluster lock from being created, it's
    definitely not necessary to panic the machine for this.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

07 Nov, 2007

1 commit

  • Do this to avoid a theoretical (I haven't seen this in practice) race where
    the downconvert thread might drop the dentry lock, allowing a remote unlink
    to proceed before dropping the inode locks. This could bounce access to the
    orphan dir between nodes.

    There doesn't seem to be a need to do the same in ocfs2_dentry_iput() as
    that's never called for the last ref drop from the downconvert thread.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

20 Oct, 2007

1 commit


25 Sep, 2006

4 commits

  • We can't use LKM_LOCAL for new dentry locks because an unlink and subsequent
    re-create of a name/inode pair may result in the lock still being mastered
    somewhere in the cluster.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • Make use of FS_RENAME_DOES_D_MOVE to avoid a race condition that can occur
    during ->rename() if we d_move() outside of the parent directory cluster
    locks, and another node discovers the new name (created during the rename)
    and unlinks it. d_move() will unconditionally rehash a dentry - which will
    leave stale data in the system.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • Replace the dentry vote mechanism with a cluster lock which covers a set
    of dentries. This allows us to force d_delete() only on nodes which actually
    care about an unlink.

    Every node that does a ->lookup() gets a read only lock on the dentry, until
    an unlink during which the unlinking node, will request an exclusive lock,
    forcing the other nodes who care about that dentry to d_delete() it. The
    effect is that we retain a very lightweight ->d_revalidate(), and at the
    same time get to make large improvements to the average case performance of
    the ocfs2 unlink and rename operations.

    This patch adds the higher level API and the dentry manipulation code.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • Replace the dentry vote mechanism with a cluster lock which covers a set
    of dentries. This allows us to force d_delete() only on nodes which actually
    care about an unlink.

    Every node that does a ->lookup() gets a read only lock on the dentry, until
    an unlink during which the unlinking node, will request an exclusive lock,
    forcing the other nodes who care about that dentry to d_delete() it. The
    effect is that we retain a very lightweight ->d_revalidate(), and at the
    same time get to make large improvements to the average case performance of
    the ocfs2 unlink and rename operations.

    This patch adds the cluster lock type which OCFS2 can attach to
    dentries. A small number of fs/ocfs2/dcache.c functions are stubbed
    out so that this change can compile.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

25 Mar, 2006

1 commit


04 Jan, 2006

1 commit