[git patches] ocfs2 post 2.6.18 features

From: Mark Fasheh
Date: Sun Sep 24 2006 - 18:11:58 EST

Hi Linus,
This series completes the final set of ocfs2 patches which I wanted
to merge upstream before 2.6.18-rc1.

These patches build on top of each other to improve ocfs2 cluster

The patch is too large for e-mail, changes are broken up in git and
can also be found at:


The first set removes an expensive clusterwide message sent during
unlink/rename (we call this the "dentry vote"). It gets replaced with a
cluster lock which covers a set of dentries. This gives us an improvement in
average-case unlink performance and reduces the file systems reliance on
direct cluster messaging. A patch to the VFS and NFS was required to get
this going. It's the final version of a patch which was initially mailed to
linux-kernel and linux-fsdevel on August 29:


The relevant parties are CC'd here, and the patch is attached to this e-mail
for any last-minute review.

Essentially, ocfs2 wanted to manually d_move() inside of rename. NFS already
does this for file renames, but ocfs2 wants to do it for all rename types,
which required also making NFS handle the d_move() for all types and fixing
up the VFS to check for the "FS_RENAME_DOES_D_MOVE" flag (which used to be
FS_ODD_RENAME) in vfs_rename_dir().

The second set revamps the way inode meta data locks are named, removing
i_generation from them. This way, a meta data lock can be acquired in
ocfs2_read_locked_inode() before reading the inode block off disk. Since the
read is covered by a lock, it can remain cached and won't have to be re-read
at a later date when the lock is acquired. My tests of cold-cache stat
timings have shown this to give a performance improvement of up to 20%.

The third set is a cleanup of dlmglue.c. No actual algorithms were changed,
some duplicated code was removed and all the different lock type specific
DLM callbacks were collapsed into a generic set that all locks can share.

And finally, my apologies for sending you multiple git pull requests so
closely spaced together. I mostly just wanted to see this patch set pushed
upstream as a logical unit.

Please pull from 'upstream-linus' branch of

to receive the following updates:

fs/namei.c | 6
fs/nfs/dir.c | 3
fs/nfs/super.c | 10
fs/ocfs2/cluster/tcp_internal.h | 8
fs/ocfs2/dcache.c | 359 ++++++++++++-
fs/ocfs2/dcache.h | 27
fs/ocfs2/dlm/dlmapi.h | 1
fs/ocfs2/dlm/dlmast.c | 6
fs/ocfs2/dlm/dlmcommon.h | 1
fs/ocfs2/dlm/dlmlock.c | 10
fs/ocfs2/dlm/dlmmaster.c | 4
fs/ocfs2/dlm/dlmrecovery.c | 3
fs/ocfs2/dlm/userdlm.c | 81 +-
fs/ocfs2/dlm/userdlm.h | 1
fs/ocfs2/dlmglue.c | 1094 ++++++++++++++++++++--------------------
fs/ocfs2/dlmglue.h | 21
fs/ocfs2/export.c | 8
fs/ocfs2/inode.c | 156 ++++-
fs/ocfs2/inode.h | 8
fs/ocfs2/journal.c | 3
fs/ocfs2/namei.c | 116 ++--
fs/ocfs2/ocfs2_lockid.h | 25
fs/ocfs2/super.c | 6
fs/ocfs2/sysfile.c | 6
fs/ocfs2/vote.c | 180 ------
fs/ocfs2/vote.h | 5
include/linux/fs.h | 7
27 files changed, 1245 insertions(+), 910 deletions(-)

Mark Fasheh:
ocfs2: Silence dlm error print
ocfs2: Allow binary names in the DLM
ocfs2: Update dlmfs for new dlmlock() API
ocfs2: Update dlmglue for new dlmlock() API
ocfs2: Add new cluster lock type
ocfs2: Add dentry tracking API
ocfs2: Hook rest of the file system into dentry locking API
ocfs2: Remove the dentry vote
Allow file systems to manually d_move() inside of ->rename()
ocfs2: manually d_move() during ocfs2_rename()
ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()
ocfs2: Free up some space in the lvb
ocfs2: Encode i_generation in the meta data lvb
ocfs2: Remove i_generation from inode lock names
ocfs2: Clean up lock resource refresh flags
ocfs2: combine inode and generic AST functions
ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops
ocfs2: Add ->get_osb() dlmglue locking operation
ocfs2: combine inode and generic blocking AST functions
ocfs2: don't unconditionally pass LVB flags
ocfs2: Check for refreshing locks in generic unblock function
ocfs2: Add ->check_downconvert callback in dlmglue
ocfs2: Add ->set_lvb callback in dlmglue
ocfs2: Have the metadata lock use generic dlmglue functions
ocfs2: Remove unused dlmglue functions
ocfs2: move downconvert worker to lockres ops
ocfs2: Remove ->unblock lockres operation
ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback