GFS2: Updated version of the "no lock_dlm" patch
Hi,
This is an updated version of the patch which merges the lock_dlm module into GFS2. I'm getting much closer towards pushing this into the tree, so don't be surprised to see something quite like this go in to the -nmw git tree within the next few days, if everything goes to plan.
The patch doesn't include the "new" lock_dlm.c file, which I've attached.
You'll also notice that I've updated the -nmw git tree to reflect the fact that Linus has pulled the set of updates that were posted recently.
Steve.
fs/gfs2/Kconfig +10 -7
@@ -1,6 +1,10 @@ config GFS2_FS tristate "GFS2 file system support" depends on EXPERIMENTAL && (64BIT || LBD) + select DLM if GFS2_FS_LOCKING_DLM + select CONFIGFS_FS if GFS2_FS_LOCKING_DLM + select SYSFS if GFS2_FS_LOCKING_DLM + select IP_SCTP if DLM_SCTP select FS_POSIX_ACL select CRC32 help
@@ -18,17 +22,16 @@ config GFS2_FS the locking module below. Documentation and utilities for GFS2 can be found here: http://sources.redhat.com/cluster - The "nolock" lock module is now built in to GFS2 by default. + The "nolock" lock module is now built in to GFS2 by default. If + you want to use the DLM, be sure to enable HOTPLUG and IPv4/6 + networking. config GFS2_FS_LOCKING_DLM - tristate "GFS2 DLM locking module" - depends on GFS2_FS && SYSFS && NET && INET && (IPV6 || IPV6=n) - select IP_SCTP if DLM_SCTP - select CONFIGFS_FS - select DLM + bool "GFS2 DLM locking" + depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && HOTPLUG help Multiple node locking module for GFS2 - Most users of GFS2 will require this module. It provides the locking + Most users of GFS2 will require this. It provides the locking interface between GFS2 and the DLM, which is required to use GFS2 in a cluster environment.
fs/gfs2/Makefile +2 -2
@@ -1,9 +1,9 @@ obj-$(CONFIG_GFS2_FS) += gfs2.o gfs2-y := acl.o bmap.o dir.o eaops.o eattr.o glock.o \ - glops.o inode.o log.o lops.o locking.o main.o meta_io.o \ + glops.o inode.o log.o lops.o main.o meta_io.o \ mount.o ops_address.o ops_dentry.o ops_export.o ops_file.o \ ops_fstype.o ops_inode.o ops_super.o quota.o \ recovery.o rgrp.o super.o sys.o trans.o util.o -obj-$(CONFIG_GFS2_FS_LOCKING_DLM) += locking/dlm/ +gfs2-$(CONFIG_GFS2_FS_LOCKING_DLM) += lock_dlm.o
fs/gfs2/acl.c +0 -1
@@ -15,7 +15,6 @@#include <linux/posix_acl.h> #include <linux/posix_acl_xattr.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include "gfs2.h" #include "incore.h"
fs/gfs2/bmap.c +0 -1
@@ -13,7 +13,6 @@#include <linux/buffer_head.h> #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> -#include <linux/lm_interface.h> #include "gfs2.h" #include "incore.h"
fs/gfs2/dir.c +0 -1
@@ -60,7 +60,6 @@#include <linux/gfs2_ondisk.h> #include <linux/crc32.h> #include <linux/vmalloc.h> -#include <linux/lm_interface.h> #include "gfs2.h" #include "incore.h"
fs/gfs2/eaops.c +0 -1
@@ -14,7 +14,6 @@#include <linux/capability.h> #include <linux/xattr.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include <asm/uaccess.h> #include "gfs2.h"
fs/gfs2/eattr.c +0 -1
@@ -13,7 +13,6 @@#include <linux/buffer_head.h> #include <linux/xattr.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include <asm/uaccess.h> #include "gfs2.h"
fs/gfs2/glock.c +74 -174
389 lines not on this page · raw message
fs/gfs2/glock.h +123 -4
152 lines not on this page · raw message
fs/gfs2/glops.c +0 -14
@@ -12,7 +12,6 @@#include <linux/completion.h> #include <linux/buffer_head.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include <linux/bio.h> #include "gfs2.h"
@@ -390,18 +389,6 @@ static int trans_go_demote_ok(const struct gfs2_glock *gl)return 0 ; } -/** -* quota_go_demote_ok - Check to see if it's ok to unlock a quota glock -* @gl: the glock -* -* Returns: 1 if it's ok -*/ - -static int quota_go_demote_ok (const struct gfs2_glock *gl) -{ -return !atomic_read (&gl->gl_lvb_count); -} -const struct gfs2_glock_operations gfs2_meta_glops = { .go_xmote_th = meta_go_sync, .go_type =LM_TYPE_META ,
@@ -448,7 +435,6 @@ const struct gfs2_glock_operations gfs2_nondisk_glops = { };const struct gfs2_glock_operations gfs2_quota_glops = { - .go_demote_ok = quota_go_demote_ok, .go_type =LM_TYPE_QUOTA , };
fs/gfs2/incore.h +54 -5
101 lines not on this page · raw message
fs/gfs2/inode.c +6 -7
@@ -16,7 +16,6 @@#include <linux/sort.h> #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> -#include <linux/lm_interface.h> #include <linux/security.h> #include <linux/time.h>
@@ -137,16 +136,16 @@ void gfs2_set_iop(struct inode *inode)if (S_ISREG (mode)) { inode->i_op = &gfs2_file_iops; -if (sdp->sd_args.ar_localflocks) - inode->i_fop = &gfs2_file_fops_nolock; +if (gfs2_localflocks (sdp)) + inode->i_fop = gfs2_file_fops_nolock;else - inode->i_fop = &gfs2_file_fops; + inode->i_fop = gfs2_file_fops; }else if (S_ISDIR (mode)) { inode->i_op = &gfs2_dir_iops; -if (sdp->sd_args.ar_localflocks) - inode->i_fop = &gfs2_dir_fops_nolock; +if (gfs2_localflocks (sdp)) + inode->i_fop = gfs2_dir_fops_nolock;else - inode->i_fop = &gfs2_dir_fops; + inode->i_fop = gfs2_dir_fops; }else if (S_ISLNK (mode)) { inode->i_op = &gfs2_symlink_iops; }else {
fs/gfs2/inode.h +18 -4
@@ -101,12 +101,26 @@ void gfs2_dinode_print(const struct gfs2_inode *ip);extern const struct inode_operations gfs2_file_iops;extern const struct inode_operations gfs2_dir_iops;extern const struct inode_operations gfs2_symlink_iops; -extern const struct file_operations gfs2_file_fops; -extern const struct file_operations gfs2_dir_fops; -extern const struct file_operations gfs2_file_fops_nolock; -extern const struct file_operations gfs2_dir_fops_nolock; +extern const struct file_operations *gfs2_file_fops_nolock; +extern const struct file_operations *gfs2_dir_fops_nolock;extern void gfs2_set_inode_flags (struct inode *inode); + +#ifdef CONFIG_GFS2_FS_LOCKING_DLM +extern const struct file_operations *gfs2_file_fops; +extern const struct file_operations *gfs2_dir_fops; +static inline int gfs2_localflocks (const struct gfs2_sbd *sdp) +{ +return sdp->sd_args.ar_localflocks; +} +#else /* Single node only */ +#define gfs2_file_fops NULL +#define gfs2_dir_fops NULL +static inline int gfs2_localflocks (const struct gfs2_sbd *sdp) +{ +return 1 ; +} +#endif /* CONFIG_GFS2_FS_LOCKING_DLM */ #endif /* __INODE_DOT_H__ */
fs/gfs2/locking.c deleted +0 -314
314 lines not on this page · raw message
fs/gfs2/locking/dlm/Makefile deleted +0 -3
@@ -1,3 +0,0 @@ -obj-$(CONFIG_GFS2_FS_LOCKING_DLM) += lock_dlm.o -lock_dlm-y := lock.o main.o mount.o sysfs.o thread.o -
fs/gfs2/locking/dlm/lock.c deleted +0 -708
708 lines not on this page · raw message
fs/gfs2/locking/dlm/lock_dlm.h deleted +0 -166
166 lines not on this page · raw message
fs/gfs2/locking/dlm/main.c deleted +0 -48
48 lines not on this page · raw message
fs/gfs2/locking/dlm/mount.c deleted +0 -276
276 lines not on this page · raw message
fs/gfs2/locking/dlm/sysfs.c deleted +0 -226
226 lines not on this page · raw message
fs/gfs2/locking/dlm/thread.c deleted +0 -68
68 lines not on this page · raw message
fs/gfs2/log.c +0 -1
@@ -14,7 +14,6 @@#include <linux/buffer_head.h> #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> -#include <linux/lm_interface.h> #include <linux/delay.h> #include <linux/kthread.h> #include <linux/freezer.h>
fs/gfs2/lops.c +0 -1
@@ -13,7 +13,6 @@#include <linux/completion.h> #include <linux/buffer_head.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include "gfs2.h" #include "incore.h"
fs/gfs2/main.c +0 -3
@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include <asm/atomic.h> #include "gfs2.h"
@@ -47,8 +46,6 @@ static void gfs2_init_glock_once(void *foo)INIT_HLIST_NODE (&gl->gl_list);spin_lock_init (&gl->gl_spin);INIT_LIST_HEAD (&gl->gl_holders); - gl->gl_lvb =NULL ; -atomic_set (&gl->gl_lvb_count,0 );INIT_LIST_HEAD (&gl->gl_lru);INIT_LIST_HEAD (&gl->gl_ail_list);atomic_set (&gl->gl_ail_count,0 );
fs/gfs2/meta_io.c +0 -1
@@ -19,7 +19,6 @@#include <linux/delay.h> #include <linux/bio.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include "gfs2.h" #include "incore.h"
fs/gfs2/mount.c +0 -1
@@ -12,7 +12,6 @@#include <linux/completion.h> #include <linux/buffer_head.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include <linux/parser.h> #include "gfs2.h"
fs/gfs2/ops_address.c +0 -1
@@ -19,7 +19,6 @@#include <linux/writeback.h> #include <linux/swap.h> #include <linux/gfs2_ondisk.h> -#include <linux/lm_interface.h> #include <linux/backing-dev.h> #include "gfs2.h"
fs/gfs2/ops_dentry.c +0 -1
@@ -13,7 +13,6 @@#include <linux/buffer_head.h> #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> -#include <linux/lm_interface.h> #include "gfs2.h" #include "incore.h"
fs/gfs2/ops_export.c +0 -1
@@ -14,7 +14,6 @@#include <linux/exportfs.h> #include <linux/gfs2_ondisk.h> #include <linux/crc32.h> -#include <linux/lm_interface.h> #include "gfs2.h" #include "incore.h"
fs/gfs2/ops_file.c +22 -52
140 lines not on this page · raw message
fs/gfs2/ops_fstype.c +94 -40
175 lines not on this page · raw message
fs/gfs2/sys.c +148 -6
154 lines not on this page · raw message
include/linux/lm_interface.h deleted +0 -277
277 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lock_dlm.c
Type: text/x-csrc
Size: 5210 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20090108/2d3f00f2/attachment.bin>
Part of the diff is not shown here. View the raw message.