* [Cluster-devel] [GFS2/DLM] Pull request
2007-03-07 14:25 [Cluster-devel] [GFS2/DLM] Bug fixes [0/12] Steven Whitehouse
@ 2007-03-07 14:43 ` Steven Whitehouse
0 siblings, 0 replies; 20+ messages in thread
From: Steven Whitehouse @ 2007-03-07 14:43 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Please consider pulling the following GFS2 & DLM bug fixes and trivial clean ups.
They are all relatively small in size,
Steve.
The following changes since commit 08e15e81a40e3241ce93b4a43886f3abda184aa6:
Linus Torvalds (1):
Linux 2.6.21-rc3
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git
Adrian Bunk (1):
[DLM] fs/dlm/user.c should #include "user.h"
akpm at linux-foundation.org (1):
[GFS2] build fix
Josef Whiter (2):
[GFS2] fix locking mistake
[GFS2] fix hangup when multiple processes are trying to write to the same file
Richard Fearn (1):
[GFS2] add newline to printk message
Steven Whitehouse (5):
[GFS2] Fix bz 230143, incorrect flushing of rgrps
[GFS2] Fix bz 229831, lookup returns wrong inode
[GFS2] Remove unused variable
[GFS2] go_drop_bh is never used, so remove it
[GFS2] Fix bz 229873, alternate test: assertion "!ip->i_inode.i_mapping->nrpages" failed
Wendy Cheng (2):
[GFS2] NFS filehandle check
[GFS2] pass formal ino in do_filldir_main
fs/dlm/user.c | 1 +
fs/gfs2/glock.c | 4 +---
fs/gfs2/glops.c | 3 ++-
fs/gfs2/incore.h | 2 --
fs/gfs2/inode.c | 7 ++++---
fs/gfs2/ops_address.c | 7 +++++--
fs/gfs2/ops_export.c | 5 +----
fs/gfs2/ops_fstype.c | 2 +-
fs/gfs2/quota.c | 2 +-
fs/gfs2/super.c | 1 -
10 files changed, 16 insertions(+), 18 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Cluster-devel] [GFS2/DLM] Pull request
2007-05-01 9:56 [Cluster-devel] [GFS2] Patches for the current merge window [0/34] Steven Whitehouse
@ 2007-05-01 14:11 ` Steven Whitehouse
0 siblings, 0 replies; 20+ messages in thread
From: Steven Whitehouse @ 2007-05-01 14:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Please consider pulling the following patches from the GFS2/DLM -nmw git tree,
Steve.
The following changes since commit dc87c3985e9b442c60994308a96f887579addc39:
Linus Torvalds (1):
libata: honour host controllers that want just one host
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw.git
Adrian Bunk (1):
[DLM] fs/dlm/ast.c should #include "ast.h"
Benjamin Marzinski (2):
[GFS2] Fix log entry list corruption
[GFS2] flush the log if a transaction can't allocate space
David Teigland (8):
[DLM] overlapping cancel and unlock
[GFS2] use log_error before LM_OUT_ERROR
[DLM] split create_message function
[DLM] add orphan purging code (1/2)
[DLM] interface for purge (2/2)
[DLM] change lkid format
[DLM] fix mode munging
[DLM] lowcomms style
Josef Bacik (2):
[DLM] Fix dlm_lowcoms_stop hang
[GFS2] use lib/parser for parsing mount options
Josef Whiter (2):
[GFS2] fix bz 231369, gfs2 will oops if you specify an invalid mount option
[GFS2] Fix bz 231380, unlock page before dequeing glocks in gfs2_commit_write
Patrick Caulfield (6):
[DLM] Fix uninitialised variable in receiving
[DLM] Don't delete misc device if lockspace removal fails
[DLM] fix coverity-spotted stupidity
[DLM] Remove redundant assignment
[DLM] Consolidate transport protocols
[DLM] Lowcomms nodeid range & initialisation fixes
Robert Peterson (4):
[GFS2] Add gfs2_tool lockdump support to gfs2 (bz 228540)
[GFS2] Red Hat bz 228540: owner references
[GFS2] bz 236008: Kernel gpf doing cat /debugfs/gfs2/xxx (lock dump)
[GFS2] lockdump improvements
Steven Whitehouse (8):
[GFS2] Fix bz 224480 and cleanup glock demotion code
[GFS2] Fix a bug on i386 due to evaluation order
[GFS2] Speed up lock_dlm's locking (move sprintf)
[GFS2] Set drop_count to 0 (off) by default
[GFS2] Fix bz 234168 (ignoring rgrp flags)
[GFS2] Patch to detect corrupt number of dir entries in leaf and/or inode blocks
[GFS2] Patch to fix mmap of stuffed files
[GFS2] Uncomment sprintf_symbol calling code
akpm at linux-foundation.org (1):
[GFS2] printk warning fixes
fs/dlm/Kconfig | 31 +-
fs/dlm/Makefile | 6 +-
fs/dlm/ast.c | 1 +
fs/dlm/config.c | 10 +-
fs/dlm/config.h | 3 +-
fs/dlm/dlm_internal.h | 11 +-
fs/dlm/lock.c | 955 ++++++++++++++++++++------
fs/dlm/lock.h | 2 +
fs/dlm/lockspace.c | 4 +-
fs/dlm/lowcomms-sctp.c | 1210 --------------------------------
fs/dlm/lowcomms-tcp.c | 1007 ---------------------------
fs/dlm/lowcomms.c | 1475 ++++++++++++++++++++++++++++++++++++++++
fs/dlm/user.c | 163 +++--
fs/gfs2/dir.c | 38 +-
fs/gfs2/glock.c | 619 ++++++++++-------
fs/gfs2/glock.h | 8 +-
fs/gfs2/incore.h | 14 +-
fs/gfs2/locking/dlm/lock.c | 14 +-
fs/gfs2/locking/dlm/lock_dlm.h | 3 +-
fs/gfs2/lops.c | 20 +-
fs/gfs2/main.c | 4 +-
fs/gfs2/mount.c | 239 ++++---
fs/gfs2/ops_address.c | 21 +-
fs/gfs2/ops_fstype.c | 4 +
fs/gfs2/ops_super.c | 28 +-
fs/gfs2/rgrp.c | 12 +-
include/linux/dlm_device.h | 9 +-
27 files changed, 3005 insertions(+), 2906 deletions(-)
delete mode 100644 fs/dlm/lowcomms-sctp.c
delete mode 100644 fs/dlm/lowcomms-tcp.c
create mode 100644 fs/dlm/lowcomms.c
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Cluster-devel] [GFS2/DLM] Pull request
2007-06-18 14:54 [Cluster-devel] [GFS2/DLM] Some small bug fixes Steven Whitehouse
@ 2007-06-18 15:13 ` Steven Whitehouse
2007-06-18 15:30 ` Steven Whitehouse
0 siblings, 1 reply; 20+ messages in thread
From: Steven Whitehouse @ 2007-06-18 15:13 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Please consider pulling the following patches from the GFS2 fixes git tree,
Steve.
------------------------------------------------------------------------
The following changes since commit 188e1f81ba31af1b65a2f3611df4c670b092bbac:
Linus Torvalds (1):
Linux 2.6.22-rc5
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git
Benjamin Marzinski (1):
[GFS2] flush the glock completely in inode_go_sync
Josef Bacik (1):
[DLM] keep dlm from panicing when traversing rsb list in debugfs
Nate Diller (1):
[GFS2] use zero_user_page
Satyam Sharma (1):
[DLM] fix a couple of races
fs/dlm/config.c | 15 +++++++++++----
fs/dlm/debug_fs.c | 9 ++++++++-
fs/gfs2/bmap.c | 6 +-----
fs/gfs2/glops.c | 2 +-
4 files changed, 21 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Cluster-devel] [GFS2/DLM] Pull request
2007-06-18 15:13 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
@ 2007-06-18 15:30 ` Steven Whitehouse
0 siblings, 0 replies; 20+ messages in thread
From: Steven Whitehouse @ 2007-06-18 15:30 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Mon, 2007-06-18 at 16:13 +0100, Steven Whitehouse wrote:
> Hi,
>
> Please consider pulling the following patches from the GFS2 fixes git tree,
>
> Steve.
>
Dave Teigland has just asked me not to push the fourth patch in the
series until later, so there are now only three patches in the set.
Sorry about that. An updated change log is below:
Steve.
--------------------------------------------------
The following changes since commit 188e1f81ba31af1b65a2f3611df4c670b092bbac:
Linus Torvalds (1):
Linux 2.6.22-rc5
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git
Benjamin Marzinski (1):
[GFS2] flush the glock completely in inode_go_sync
Nate Diller (1):
[GFS2] use zero_user_page
Satyam Sharma (1):
[DLM] fix a couple of races
fs/dlm/config.c | 15 +++++++++++----
fs/gfs2/bmap.c | 6 +-----
fs/gfs2/glops.c | 2 +-
3 files changed, 13 insertions(+), 10 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Cluster-devel] [GFS2/DLM] Pull request
2007-07-09 16:02 [Cluster-devel] [GFS2/DLM] Pre-pull Patch Posting swhiteho
@ 2007-07-10 7:50 ` Steven Whitehouse
0 siblings, 0 replies; 20+ messages in thread
From: Steven Whitehouse @ 2007-07-10 7:50 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Please consider pulling the following changes from the GFS2/DLM -nmw git
tree,
Steve.
--------------------------------------------------------------------
The following changes since commit 7dcca30a32aadb0520417521b0c44f42d09fe05c:
Linus Torvalds (1):
Linux 2.6.22
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw.git
Abhijith Das (4):
[GFS2] Quotas non-functional - fix bug
[GFS2] Quotas non-functional - fix another bug
[GFS2] Fix deallocation issues
[GFS2] System won't suspend with GFS2 file system mounted
Benjamin Marzinski (2):
[GFS2] flush the glock completely in inode_go_sync
[GFS2] fix jdata issues
Bob Peterson (1):
[GFS2] remounting w/o acl option leaves acls enabled
David Teigland (15):
[DLM] block scand during recovery [1/6]
[DLM] add lock timeouts and warnings [2/6]
[DLM] dlm_device interface changes [3/6]
[DLM] cancel in conversion deadlock [4/6]
[DLM] fix new_lockspace error exit [5/6]
[DLM] wait for config check during join [6/6]
[DLM] fix compile breakage
[DLM] timeout fixes
[DLM] canceling deadlocked lock
[DLM] dumping master locks
[DLM] show default protocol
[GFS2] set plock owner in GETLK info
[GFS2] return conflicts for GETLK
[DLM] don't require FS flag on all nodes
[DLM] dump more lock values
Fabio Massimo Di Nitto (1):
[GFS2] latest gfs2-nmw headers break userland build
Josef Bacik (2):
[DLM] keep dlm from panicing when traversing rsb list in debugfs
[DLM] fix reference counting
Nate Diller (1):
[GFS2] use zero_user_page
Patrick Caulfield (3):
[DLM] fix socket shutdown
[DLM] variable allocation
[DLM] Telnet to port 21064 can stop all lockspaces
Robert Peterson (7):
[GFS2] kernel changes to support new gfs2_grow command
[GFS2] Kernel changes to support new gfs2_grow command (part 2)
[GFS2] Addendum patch 2 for gfs2_grow
[GFS2] Can't mount GFS2 file system on AoE device
[GFS2] Journaled file write/unstuff bug
[GFS2] assertion failure after writing to journaled file, umount
[GFS2] Addendum to the journaled file/unmount patch
S. Wendy Cheng (1):
[GFS2] Fix gfs2_block_truncate_page err return
Satyam Sharma (1):
[DLM] fix a couple of races
Steven Whitehouse (13):
[GFS2] Reduce size of struct gdlm_lock
[GFS2] Clean up inode number handling
[DLM] Compile fix
[GFS2] Make the log reserved blocks depend on block size
[GFS2] Fix sign problem in quota/statfs and cleanup _host structures
[GFS2] Add nanosecond timestamp feature
[GFS2] Fix typo in rename of directories
[GFS2] Fix bug in error path of inode
[GFS2] Recovery for lost unlinked inodes
[GFS2] Remove bogus '\0' in rgrp.c
[GFS2] Use zero_user_page() in stuffed_readpage()
[GFS2] Simplify multiple glock aquisition
[GFS2] Small fixes to logging code
Wendy Cheng (3):
[GFS2] inode size inconsistency
[GFS2] Obtaining no_formal_ino from directory entry
[GFS2] Remove i_mode passing from NFS File Handle
akpm at linux-foundation.org (2):
[GFS2] gfs2_lookupi() uninitialised var fix
[GFS2] git-gfs2-nmw-build-fix
fs/dlm/Makefile | 1 +
fs/dlm/config.c | 25 ++-
fs/dlm/config.h | 1 +
fs/dlm/debug_fs.c | 186 +++++++++++++++-
fs/dlm/dlm_internal.h | 17 ++
fs/dlm/lock.c | 470 +++++++++++++++++++++++++++++++---------
fs/dlm/lock.h | 13 +-
fs/dlm/lockspace.c | 86 ++++++--
fs/dlm/lowcomms.c | 23 ++-
fs/dlm/main.c | 11 +-
fs/dlm/member.c | 11 +-
fs/dlm/netlink.c | 153 +++++++++++++
fs/dlm/rcom.c | 13 +-
fs/dlm/recoverd.c | 4 +-
fs/dlm/user.c | 129 +++++++++---
fs/gfs2/Makefile | 2 +-
fs/gfs2/bmap.c | 23 +-
fs/gfs2/daemon.c | 11 +
fs/gfs2/dir.c | 69 +++++--
fs/gfs2/dir.h | 9 +-
fs/gfs2/eattr.c | 14 +-
fs/gfs2/glock.c | 123 +++++------
fs/gfs2/glock.h | 1 +
fs/gfs2/glops.c | 2 +-
fs/gfs2/incore.h | 81 ++++++-
fs/gfs2/inode.c | 288 +++++++++++++++++-------
fs/gfs2/inode.h | 30 ++-
fs/gfs2/locking/dlm/lock.c | 11 +-
fs/gfs2/locking/dlm/lock_dlm.h | 2 +-
fs/gfs2/locking/dlm/mount.c | 2 +-
fs/gfs2/locking/dlm/plock.c | 8 +-
fs/gfs2/locking/dlm/thread.c | 11 +-
fs/gfs2/log.c | 129 +++++++++---
fs/gfs2/lops.c | 49 ++--
fs/gfs2/lops.h | 23 ++
fs/gfs2/meta_io.c | 8 +-
fs/gfs2/meta_io.h | 2 +-
fs/gfs2/mount.c | 25 +-
fs/gfs2/ondisk.c | 251 ---------------------
fs/gfs2/ops_address.c | 69 +++++-
fs/gfs2/ops_address.h | 2 +-
fs/gfs2/ops_dentry.c | 24 +--
fs/gfs2/ops_export.c | 63 +++---
fs/gfs2/ops_export.h | 22 --
fs/gfs2/ops_file.c | 4 +-
fs/gfs2/ops_fstype.c | 33 ++--
fs/gfs2/ops_fstype.h | 1 +
fs/gfs2/ops_inode.c | 30 ++--
fs/gfs2/ops_super.c | 8 +-
fs/gfs2/ops_vm.c | 2 +-
fs/gfs2/quota.c | 57 +++++-
fs/gfs2/recovery.c | 22 ++-
fs/gfs2/rgrp.c | 377 ++++++++++++++++++++++++--------
fs/gfs2/rgrp.h | 1 +
fs/gfs2/super.c | 79 +++++--
fs/gfs2/super.h | 2 +-
fs/gfs2/util.c | 6 +-
include/linux/Kbuild | 1 +
include/linux/dlm.h | 14 +-
include/linux/dlm_device.h | 22 ++-
include/linux/dlm_netlink.h | 56 +++++
include/linux/gfs2_ondisk.h | 142 +-----------
62 files changed, 2247 insertions(+), 1107 deletions(-)
create mode 100644 fs/dlm/netlink.c
delete mode 100644 fs/gfs2/ondisk.c
delete mode 100644 fs/gfs2/ops_export.h
create mode 100644 include/linux/dlm_netlink.h
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed
@ 2007-08-14 9:47 swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] fix NULL ls usage swhiteho
` (11 more replies)
0 siblings, 12 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Patrick Caulfield <pcaulfie@redhat.com>
This patch clears the othercon pointer and frees the memory when a connnection
is closed. This could cause a small memory leak when nodes leave the cluster.
Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index dd36273..d15fd5f 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -327,6 +327,8 @@ static void close_connection(struct connection *con, bool and_other)
if (con->othercon && and_other) {
/* Will only re-enter once. */
close_connection(con->othercon, false);
+ kmem_cache_free(con_cache, con->othercon);
+ con->othercon = NULL;
}
if (con->rx_page) {
__free_page(con->rx_page);
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [DLM] fix NULL ls usage
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] zero unused parts of sockaddr_storage swhiteho
` (10 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: David Teigland <teigland@redhat.com>
Fix regression in recent patch "[DLM] variable allocation" which
attempts to dereference an "ls" struct when it's NULL.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index e3a1527..188b91c 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -386,8 +386,7 @@ static void receive_rcom_lock_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
dlm_recover_process_copy(ls, rc_in);
}
-static int send_ls_not_ready(struct dlm_ls *ls, int nodeid,
- struct dlm_rcom *rc_in)
+static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
{
struct dlm_rcom *rc;
struct rcom_config *rf;
@@ -395,7 +394,7 @@ static int send_ls_not_ready(struct dlm_ls *ls, int nodeid,
char *mb;
int mb_len = sizeof(struct dlm_rcom) + sizeof(struct rcom_config);
- mh = dlm_lowcomms_get_buffer(nodeid, mb_len, ls->ls_allocation, &mb);
+ mh = dlm_lowcomms_get_buffer(nodeid, mb_len, GFP_NOFS, &mb);
if (!mh)
return -ENOBUFS;
memset(mb, 0, mb_len);
@@ -465,7 +464,7 @@ void dlm_receive_rcom(struct dlm_header *hd, int nodeid)
log_print("lockspace %x from %d type %x not found",
hd->h_lockspace, nodeid, rc->rc_type);
if (rc->rc_type == DLM_RCOM_STATUS)
- send_ls_not_ready(ls, nodeid, rc);
+ send_ls_not_ready(nodeid, rc);
return;
}
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [DLM] zero unused parts of sockaddr_storage
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] fix NULL ls usage swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero swhiteho
` (9 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Patrick Caulfield <pcaulfie@redhat.com>
When we build a sockaddr_storage for an IP address, clear the unused parts as
they could be used for node comparisons.
I have seen this occasionally make sctp connections fail.
Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index d15fd5f..631bc43 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -313,6 +313,7 @@ static void make_sockaddr(struct sockaddr_storage *saddr, uint16_t port,
in6_addr->sin6_port = cpu_to_be16(port);
*addr_len = sizeof(struct sockaddr_in6);
}
+ memset((char *)saddr + *addr_len, 0, sizeof(struct sockaddr_storage) - *addr_len);
}
/* Close a remote connection and tidy up */
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] fix NULL ls usage swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] zero unused parts of sockaddr_storage swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] More othercon fixes swhiteho
` (8 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Jesper Juhl <jesper.juhl@gmail.com>
There's a memory leak in fs/dlm/member.c::dlm_add_member().
If "dlm_node_weight(ls->ls_name, nodeid)" returns < 0, then
we'll return without freeing the memory allocated to the (at
that point yet unused) 'memb'.
This patch frees the allocated memory in that case and thus
avoids the leak.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index 073599d..d099775 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -56,8 +56,10 @@ static int dlm_add_member(struct dlm_ls *ls, int nodeid)
return -ENOMEM;
w = dlm_node_weight(ls->ls_name, nodeid);
- if (w < 0)
+ if (w < 0) {
+ kfree(memb);
return w;
+ }
memb->nodeid = nodeid;
memb->weight = w;
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [DLM] More othercon fixes
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (2 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] fix basts for granted PR waiting CW swhiteho
` (7 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Patrick Caulfield <pcaulfie@redhat.com>
The last patch to clean out 'othercon' structures only fixed half the problem.
The attached addresses the other situations too, and fixes bz#238490
Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 631bc43..9e9d2e8 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -328,15 +328,24 @@ static void close_connection(struct connection *con, bool and_other)
if (con->othercon && and_other) {
/* Will only re-enter once. */
close_connection(con->othercon, false);
- kmem_cache_free(con_cache, con->othercon);
- con->othercon = NULL;
}
if (con->rx_page) {
__free_page(con->rx_page);
con->rx_page = NULL;
}
- con->retries = 0;
- mutex_unlock(&con->sock_mutex);
+
+ /* If we are an 'othercon' then NULL the pointer to us
+ from the parent and tidy ourself up */
+ if (test_bit(CF_IS_OTHERCON, &con->flags)) {
+ struct connection *parent = __nodeid2con(con->nodeid, 0);
+ parent->othercon = NULL;
+ kmem_cache_free(con_cache, con);
+ }
+ else {
+ /* Parent connections get reused */
+ con->retries = 0;
+ mutex_unlock(&con->sock_mutex);
+ }
}
/* We only send shutdown messages to nodes that are not part of the cluster */
@@ -634,7 +643,7 @@ out_resched:
out_close:
mutex_unlock(&con->sock_mutex);
- if (ret != -EAGAIN && !test_bit(CF_IS_OTHERCON, &con->flags)) {
+ if (ret != -EAGAIN) {
close_connection(con, false);
/* Reconnect when there is something to send */
}
@@ -1125,8 +1134,6 @@ static int tcp_listen_for_all(void)
log_print("Using TCP for communications");
- set_bit(CF_IS_OTHERCON, &con->flags);
-
sock = tcp_create_listen_sock(con, dlm_local_addr[0]);
if (sock) {
add_sock(sock, con);
@@ -1410,7 +1417,7 @@ void dlm_lowcomms_stop(void)
for (i = 0; i <= max_nodeid; i++) {
con = __nodeid2con(i, 0);
if (con) {
- con->flags |= 0xFF;
+ con->flags |= 0x0F;
if (con->sock)
con->sock->sk->sk_user_data = NULL;
}
@@ -1426,8 +1433,6 @@ void dlm_lowcomms_stop(void)
con = __nodeid2con(i, 0);
if (con) {
close_connection(con, true);
- if (con->othercon)
- kmem_cache_free(con_cache, con->othercon);
kmem_cache_free(con_cache, con);
}
}
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [DLM] fix basts for granted PR waiting CW
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (3 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] More othercon fixes swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup detected in databuf_lo_before_commit swhiteho
` (6 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: David Teigland <teigland@redhat.com>
Fix a long standing bug where a blocking callback would be missed
when there's a granted lock in PR mode and waiting locks in both
PR and CW modes (and the PR lock was added to the waiting queue
before the CW lock). The logic simply compared the numerical values
of the modes to determine if a blocking callback was required, but in
the one case of PR and CW, the lower valued CW mode blocks the higher
valued PR mode. We just need to add a special check for this PR/CW
case in the tests that decide when a blocking callback is needed.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index b455919..2082daf 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1670,9 +1670,10 @@ static int can_be_granted(struct dlm_rsb *r, struct dlm_lkb *lkb, int now,
with a deadlk here, we'd have to generate something like grant_lock with
the deadlk error.) */
-/* returns the highest requested mode of all blocked conversions */
+/* Returns the highest requested mode of all blocked conversions; sets
+ cw if there's a blocked conversion to DLM_LOCK_CW. */
-static int grant_pending_convert(struct dlm_rsb *r, int high)
+static int grant_pending_convert(struct dlm_rsb *r, int high, int *cw)
{
struct dlm_lkb *lkb, *s;
int hi, demoted, quit, grant_restart, demote_restart;
@@ -1709,6 +1710,9 @@ static int grant_pending_convert(struct dlm_rsb *r, int high)
}
hi = max_t(int, lkb->lkb_rqmode, hi);
+
+ if (cw && lkb->lkb_rqmode == DLM_LOCK_CW)
+ *cw = 1;
}
if (grant_restart)
@@ -1721,29 +1725,52 @@ static int grant_pending_convert(struct dlm_rsb *r, int high)
return max_t(int, high, hi);
}
-static int grant_pending_wait(struct dlm_rsb *r, int high)
+static int grant_pending_wait(struct dlm_rsb *r, int high, int *cw)
{
struct dlm_lkb *lkb, *s;
list_for_each_entry_safe(lkb, s, &r->res_waitqueue, lkb_statequeue) {
if (can_be_granted(r, lkb, 0, NULL))
grant_lock_pending(r, lkb);
- else
+ else {
high = max_t(int, lkb->lkb_rqmode, high);
+ if (lkb->lkb_rqmode == DLM_LOCK_CW)
+ *cw = 1;
+ }
}
return high;
}
+/* cw of 1 means there's a lock with a rqmode of DLM_LOCK_CW that's blocked
+ on either the convert or waiting queue.
+ high is the largest rqmode of all locks blocked on the convert or
+ waiting queue. */
+
+static int lock_requires_bast(struct dlm_lkb *gr, int high, int cw)
+{
+ if (gr->lkb_grmode == DLM_LOCK_PR && cw) {
+ if (gr->lkb_highbast < DLM_LOCK_EX)
+ return 1;
+ return 0;
+ }
+
+ if (gr->lkb_highbast < high &&
+ !__dlm_compat_matrix[gr->lkb_grmode+1][high+1])
+ return 1;
+ return 0;
+}
+
static void grant_pending_locks(struct dlm_rsb *r)
{
struct dlm_lkb *lkb, *s;
int high = DLM_LOCK_IV;
+ int cw = 0;
DLM_ASSERT(is_master(r), dlm_dump_rsb(r););
- high = grant_pending_convert(r, high);
- high = grant_pending_wait(r, high);
+ high = grant_pending_convert(r, high, &cw);
+ high = grant_pending_wait(r, high, &cw);
if (high == DLM_LOCK_IV)
return;
@@ -1751,27 +1778,41 @@ static void grant_pending_locks(struct dlm_rsb *r)
/*
* If there are locks left on the wait/convert queue then send blocking
* ASTs to granted locks based on the largest requested mode (high)
- * found above. FIXME: highbast < high comparison not valid for PR/CW.
+ * found above.
*/
list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) {
- if (lkb->lkb_bastaddr && (lkb->lkb_highbast < high) &&
- !__dlm_compat_matrix[lkb->lkb_grmode+1][high+1]) {
- queue_bast(r, lkb, high);
+ if (lkb->lkb_bastaddr && lock_requires_bast(lkb, high, cw)) {
+ if (cw && high == DLM_LOCK_PR)
+ queue_bast(r, lkb, DLM_LOCK_CW);
+ else
+ queue_bast(r, lkb, high);
lkb->lkb_highbast = high;
}
}
}
+static int modes_require_bast(struct dlm_lkb *gr, struct dlm_lkb *rq)
+{
+ if ((gr->lkb_grmode == DLM_LOCK_PR && rq->lkb_rqmode == DLM_LOCK_CW) ||
+ (gr->lkb_grmode == DLM_LOCK_CW && rq->lkb_rqmode == DLM_LOCK_PR)) {
+ if (gr->lkb_highbast < DLM_LOCK_EX)
+ return 1;
+ return 0;
+ }
+
+ if (gr->lkb_highbast < rq->lkb_rqmode && !modes_compat(gr, rq))
+ return 1;
+ return 0;
+}
+
static void send_bast_queue(struct dlm_rsb *r, struct list_head *head,
struct dlm_lkb *lkb)
{
struct dlm_lkb *gr;
list_for_each_entry(gr, head, lkb_statequeue) {
- if (gr->lkb_bastaddr &&
- gr->lkb_highbast < lkb->lkb_rqmode &&
- !modes_compat(gr, lkb)) {
+ if (gr->lkb_bastaddr && modes_require_bast(gr, lkb)) {
queue_bast(r, gr, lkb->lkb_rqmode);
gr->lkb_highbast = lkb->lkb_rqmode;
}
@@ -2235,7 +2276,7 @@ static int do_convert(struct dlm_rsb *r, struct dlm_lkb *lkb)
before we try again to grant this one. */
if (is_demoted(lkb)) {
- grant_pending_convert(r, DLM_LOCK_IV);
+ grant_pending_convert(r, DLM_LOCK_IV, NULL);
if (_can_be_granted(r, lkb, 1)) {
grant_lock(r, lkb);
queue_cast(r, lkb, 0);
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [GFS2] soft lockup detected in databuf_lo_before_commit
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (4 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] fix basts for granted PR waiting CW swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup in rgblk_search swhiteho
` (5 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Bob Peterson <rpeterso@redhat.com>
This is part 2 of the patch for bug #245832, part 1 of which is already
in the git tree.
The problem was that sdp->sd_log_num_databuf was not always being
protected by the gfs2_log_lock spinlock, but the sd_log_le_databuf
(which it is supposed to reflect) was protected. That meant there
was a timing window during which gfs2_log_flush called
databuf_lo_before_commit and the count didn't match what was
really on the linked list in that window. So when it ran out of
items on the linked list, it decremented total_dbuf from 0 to -1 and
thus never left the "while(total_dbuf)" loop.
The solution is to protect the variable sdp->sd_log_num_databuf so
that the value will always match the contents of the linked list,
and therefore the number will never go negative, and therefore, the
loop will be exited properly.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index aff70f0..3b395c4 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -486,8 +486,8 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
gfs2_pin(sdp, bd->bd_bh);
tr->tr_num_databuf_new++;
}
- sdp->sd_log_num_databuf++;
gfs2_log_lock(sdp);
+ sdp->sd_log_num_databuf++;
list_add(&le->le_list, &sdp->sd_log_le_databuf);
gfs2_log_unlock(sdp);
}
@@ -523,7 +523,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
struct buffer_head *bh = NULL,*bh1 = NULL;
struct gfs2_log_descriptor *ld;
unsigned int limit;
- unsigned int total_dbuf = sdp->sd_log_num_databuf;
+ unsigned int total_dbuf;
unsigned int total_jdata = sdp->sd_log_num_jdata;
unsigned int num, n;
__be64 *ptr = NULL;
@@ -535,6 +535,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
* into the log along with a header
*/
gfs2_log_lock(sdp);
+ total_dbuf = sdp->sd_log_num_databuf;
bd2 = bd1 = list_prepare_entry(bd1, &sdp->sd_log_le_databuf,
bd_le.le_list);
while(total_dbuf) {
@@ -653,6 +654,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
break;
}
bh = NULL;
+ BUG_ON(total_dbuf < num);
total_dbuf -= num;
total_jdata -= num;
}
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [GFS2] soft lockup in rgblk_search
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (5 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup detected in databuf_lo_before_commit swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect return code in rgrp.c swhiteho
` (4 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Bob Peterson <rpeterso@redhat.com>
This patch seems to fix the problem described in bugzilla bug 246114.
It was written by Steve Whitehouse with some tweaking by me.
The code was looping in the relatively new section of code designed to
search for and reuse unlinked inodes. In cases where it was finding an
appropriate inode to reuse, it was looping around and finding the same
block over and over because a "<=" check should have been a "<" when
comparing the goal block to the last unlinked block found.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index e4e0406..bb58e69 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -863,16 +863,19 @@ static struct inode *try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked)
u64 no_addr;
for(;;) {
+ if (goal >= rgd->rd_data)
+ break;
goal = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
GFS2_BLKST_UNLINKED);
if (goal == 0)
- return 0;
+ break;
no_addr = goal + rgd->rd_data0;
- if (no_addr <= *last_unlinked)
+ goal++;
+ if (no_addr < *last_unlinked)
continue;
*last_unlinked = no_addr;
inode = gfs2_inode_lookup(rgd->rd_sbd->sd_vfs, DT_UNKNOWN,
- no_addr, -1);
+ no_addr, -1);
if (!IS_ERR(inode))
return inode;
}
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [GFS2] Fix incorrect return code in rgrp.c
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (6 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup in rgblk_search swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect error path in prepare_write() swhiteho
` (3 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Steven Whitehouse <swhiteho@redhat.com>
The following patch fixes a bug where 0 was being used as a return code
to indicate "nothing to do" when in fact 0 was a valid block location
which might be returned by the function.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index bb58e69..ce48c45 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -867,7 +867,7 @@ static struct inode *try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked)
break;
goal = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
GFS2_BLKST_UNLINKED);
- if (goal == 0)
+ if (goal == BFITNOENT)
break;
no_addr = goal + rgd->rd_data0;
goal++;
@@ -1316,7 +1316,7 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal,
bi->bi_len, blk, new_state);
}
- return (blk == BFITNOENT) ? 0 : (bi->bi_start * GFS2_NBBY) + blk;
+ return (blk == BFITNOENT) ? blk : (bi->bi_start * GFS2_NBBY) + blk;
}
/**
@@ -1396,6 +1396,7 @@ u64 gfs2_alloc_data(struct gfs2_inode *ip)
goal = rgd->rd_last_alloc_data;
blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
+ BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_data = blk;
block = rgd->rd_data0 + blk;
@@ -1440,6 +1441,7 @@ u64 gfs2_alloc_meta(struct gfs2_inode *ip)
goal = rgd->rd_last_alloc_meta;
blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
+ BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_meta = blk;
block = rgd->rd_data0 + blk;
@@ -1481,6 +1483,7 @@ u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation)
blk = rgblk_search(rgd, rgd->rd_last_alloc_meta,
GFS2_BLKST_FREE, GFS2_BLKST_DINODE);
+ BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_meta = blk;
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [GFS2] Fix incorrect error path in prepare_write()
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (7 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect return code in rgrp.c swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix setting of inherit jdata attr swhiteho
` (2 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Steven Whitehouse <swhiteho@redhat.com>
The error path in prepare_write() was incorrect in the (very rare) event
that the transaction fails to start. The following prevents a NULL
pointer dereference,
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index ce90032..42a5f58 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -416,7 +416,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page,
error = gfs2_trans_begin(sdp, rblocks, 0);
if (error)
- goto out;
+ goto out_trans_fail;
if (gfs2_is_stuffed(ip)) {
if (end > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode)) {
@@ -434,6 +434,7 @@ prepare_write:
out:
if (error) {
gfs2_trans_end(sdp);
+out_trans_fail:
if (alloc_required) {
gfs2_inplace_release(ip);
out_qunlock:
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [GFS2] Fix setting of inherit jdata attr
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (8 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect error path in prepare_write() swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Revert remounting w/o acl option leaves acls enabled swhiteho
2007-08-14 10:08 ` [Cluster-devel] [GFS2/DLM] [0/12] Pre pull request patch posting Steven Whitehouse
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Steven Whitehouse <swhiteho@redhat.com>
Due to a mix up between the jdata attribute and inherit jdata attribute
it has not been possible to set the inherit jdata attribute on
directories. This is now fixed and the ioctl will report the inherit
jdata attribute for directories rather than the jdata attribute as it
did previously. This stems from our need to have the one bit in the
ioctl attr flags mean two different things according to whether the
underlying inode is a directory or not.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 7734211..94d76ac 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -177,8 +177,8 @@ static const u32 fsflags_to_gfs2[32] = {
[5] = GFS2_DIF_APPENDONLY,
[7] = GFS2_DIF_NOATIME,
[12] = GFS2_DIF_EXHASH,
- [14] = GFS2_DIF_JDATA,
- [20] = GFS2_DIF_DIRECTIO,
+ [14] = GFS2_DIF_INHERIT_JDATA,
+ [20] = GFS2_DIF_INHERIT_DIRECTIO,
};
static const u32 gfs2_to_fsflags[32] = {
@@ -187,8 +187,6 @@ static const u32 gfs2_to_fsflags[32] = {
[gfs2fl_AppendOnly] = FS_APPEND_FL,
[gfs2fl_NoAtime] = FS_NOATIME_FL,
[gfs2fl_ExHash] = FS_INDEX_FL,
- [gfs2fl_Jdata] = FS_JOURNAL_DATA_FL,
- [gfs2fl_Directio] = FS_DIRECTIO_FL,
[gfs2fl_InheritDirectio] = FS_DIRECTIO_FL,
[gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL,
};
@@ -207,6 +205,12 @@ static int gfs2_get_flags(struct file *filp, u32 __user *ptr)
return error;
fsflags = fsflags_cvt(gfs2_to_fsflags, ip->i_di.di_flags);
+ if (!S_ISDIR(inode->i_mode)) {
+ if (ip->i_di.di_flags & GFS2_DIF_JDATA)
+ fsflags |= FS_JOURNAL_DATA_FL;
+ if (ip->i_di.di_flags & GFS2_DIF_DIRECTIO)
+ fsflags |= FS_DIRECTIO_FL;
+ }
if (put_user(fsflags, ptr))
error = -EFAULT;
@@ -270,13 +274,6 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask)
if ((new_flags ^ flags) == 0)
goto out;
- if (S_ISDIR(inode->i_mode)) {
- if ((new_flags ^ flags) & GFS2_DIF_JDATA)
- new_flags ^= (GFS2_DIF_JDATA|GFS2_DIF_INHERIT_JDATA);
- if ((new_flags ^ flags) & GFS2_DIF_DIRECTIO)
- new_flags ^= (GFS2_DIF_DIRECTIO|GFS2_DIF_INHERIT_DIRECTIO);
- }
-
error = -EINVAL;
if ((new_flags ^ flags) & ~GFS2_FLAGS_USER_SET)
goto out;
@@ -315,11 +312,19 @@ out:
static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
{
+ struct inode *inode = filp->f_path.dentry->d_inode;
u32 fsflags, gfsflags;
if (get_user(fsflags, ptr))
return -EFAULT;
gfsflags = fsflags_cvt(fsflags_to_gfs2, fsflags);
- return do_gfs2_set_flags(filp, gfsflags, ~0);
+ if (!S_ISDIR(inode->i_mode)) {
+ if (gfsflags & GFS2_DIF_INHERIT_JDATA)
+ gfsflags ^= (GFS2_DIF_JDATA | GFS2_DIF_INHERIT_JDATA);
+ if (gfsflags & GFS2_DIF_INHERIT_DIRECTIO)
+ gfsflags ^= (GFS2_DIF_DIRECTIO | GFS2_DIF_INHERIT_DIRECTIO);
+ return do_gfs2_set_flags(filp, gfsflags, ~0);
+ }
+ return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_JDATA);
}
static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [PATCH] [GFS2] Revert remounting w/o acl option leaves acls enabled
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (9 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix setting of inherit jdata attr swhiteho
@ 2007-08-14 9:47 ` swhiteho
2007-08-14 10:08 ` [Cluster-devel] [GFS2/DLM] [0/12] Pre pull request patch posting Steven Whitehouse
11 siblings, 0 replies; 20+ messages in thread
From: swhiteho @ 2007-08-14 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Steven Whitehouse <swhiteho@redhat.com>
This reverts commit 569a7b6c2e8965ff4908003b925757703a3d649c. The
code was correct originally. The default setting for ACLs after a
remount should be to be the same as before the remount.
Signed-off-by: Abhijith Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c
index 6f006a8..4864659 100644
--- a/fs/gfs2/mount.c
+++ b/fs/gfs2/mount.c
@@ -82,19 +82,20 @@ int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, int remount)
char *options, *o, *v;
int error = 0;
- /* If someone preloaded options, use those instead */
- spin_lock(&gfs2_sys_margs_lock);
- if (!remount && gfs2_sys_margs) {
- data = gfs2_sys_margs;
- gfs2_sys_margs = NULL;
- }
- spin_unlock(&gfs2_sys_margs_lock);
+ if (!remount) {
+ /* If someone preloaded options, use those instead */
+ spin_lock(&gfs2_sys_margs_lock);
+ if (gfs2_sys_margs) {
+ data = gfs2_sys_margs;
+ gfs2_sys_margs = NULL;
+ }
+ spin_unlock(&gfs2_sys_margs_lock);
- /* Set some defaults */
- memset(args, 0, sizeof(struct gfs2_args));
- args->ar_num_glockd = GFS2_GLOCKD_DEFAULT;
- args->ar_quota = GFS2_QUOTA_DEFAULT;
- args->ar_data = GFS2_DATA_DEFAULT;
+ /* Set some defaults */
+ args->ar_num_glockd = GFS2_GLOCKD_DEFAULT;
+ args->ar_quota = GFS2_QUOTA_DEFAULT;
+ args->ar_data = GFS2_DATA_DEFAULT;
+ }
/* Split the options into tokens with the "," character and
process them */
--
1.5.1.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Cluster-devel] [GFS2/DLM] [0/12] Pre pull request patch posting
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
` (10 preceding siblings ...)
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Revert remounting w/o acl option leaves acls enabled swhiteho
@ 2007-08-14 10:08 ` Steven Whitehouse
2007-08-14 16:44 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
11 siblings, 1 reply; 20+ messages in thread
From: Steven Whitehouse @ 2007-08-14 10:08 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
This set of patches are from the GFS2 -fixes tree. There are further
fixes currently in the -nmw git tree, but these are the ones which have
been there some time and are known to fix important issues, so these are
the ones which I'll send a pull request for shortly,
Steve.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Cluster-devel] [GFS2/DLM] Pull request
2007-08-14 10:08 ` [Cluster-devel] [GFS2/DLM] [0/12] Pre pull request patch posting Steven Whitehouse
@ 2007-08-14 16:44 ` Steven Whitehouse
0 siblings, 0 replies; 20+ messages in thread
From: Steven Whitehouse @ 2007-08-14 16:44 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Please consider pulling the following bug fixes from the GFS2/DLM -fixes git tree,
Steve.
The following changes since commit 39d3520c92cf7a28c07229ca00cc35a1e8026c77:
Linus Torvalds (1):
Linux 2.6.23-rc3
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git
Bob Peterson (2):
[GFS2] soft lockup detected in databuf_lo_before_commit
[GFS2] soft lockup in rgblk_search
David Teigland (2):
[DLM] fix NULL ls usage
[DLM] fix basts for granted PR waiting CW
Jesper Juhl (1):
[DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero
Patrick Caulfield (3):
[DLM] Clear othercon pointers when a connection is closed
[DLM] zero unused parts of sockaddr_storage
[DLM] More othercon fixes
Steven Whitehouse (4):
[GFS2] Fix incorrect return code in rgrp.c
[GFS2] Fix incorrect error path in prepare_write()
[GFS2] Fix setting of inherit jdata attr
[GFS2] Revert remounting w/o acl option leaves acls enabled
fs/dlm/lock.c | 69 +++++++++++++++++++++++++++++++++++++++----------
fs/dlm/lowcomms.c | 24 +++++++++++-----
fs/dlm/member.c | 4 ++-
fs/dlm/rcom.c | 7 ++---
fs/gfs2/lops.c | 6 +++-
fs/gfs2/mount.c | 25 +++++++++--------
fs/gfs2/ops_address.c | 3 +-
fs/gfs2/ops_file.c | 29 ++++++++++++--------
fs/gfs2/rgrp.c | 16 ++++++++---
9 files changed, 124 insertions(+), 59 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Cluster-devel] [GFS2/DLM] Pull request
2007-10-04 8:48 [Cluster-devel] [GFS2/DLM] Pre-pull patch posting swhiteho
@ 2007-10-12 7:47 ` Steven Whitehouse
0 siblings, 0 replies; 20+ messages in thread
From: Steven Whitehouse @ 2007-10-12 7:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
There have been no changes since I posted the patches for review a few
days ago. Please consider pulling the following changes from the
GFS2/DLM -nmw git tree:
The following changes since commit bbf25010f1a6b761914430f5fca081ec8c7accd1:
Linus Torvalds (1):
Linux 2.6.23
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw.git
Abhijith Das (5):
[GFS2] Force unstuff of hidden quota inode
[GFS2] Fix quota do_list operation hang
[GFS2] Wendy's dump lockname in hex & fix glock dump
[GFS2] panic after can't parse mount arguments
[GFS2] flocks from same process trip kernel BUG at fs/gfs2/glock.c:1118!
Benjamin Marzinski (3):
[GFS2] Add NULL entry to token table
[GFS2] delay glock demote for a minimum hold time
[GFS2] Alternate gfs2_iget to avoid looking up inodes being freed
Bob Peterson (9):
[GFS2] Move some code inside the log lock
[GFS2] Revert part of earlier log.c changes
[GFS2] Prevent infinite loop in try_rgrp_unlink()
[GFS2] Detach buf data during in-place writeback
[GFS2] invalid metadata block - REVISED
[GFS2] Ensure journal file cache is flushed after recovery
[GFS2] Patch to protect sd_log_num_jdata
[GFS2] Fix ordering of dirty/journal for ordered buffer unstuffing
[GFS2] GFS2: chmod hung - fix race in thread creation
David Teigland (1):
[DLM] block dlm_recv in recovery transition
Denis Cheng (7):
[GFS2] use an temp variable to reduce a spin_unlock
[GFS2] mark struct *_operations const
[GFS2] use the declaration of gfs2_dops in the header file instead
[GFS2] use list_for_each_entry instead
[GFS2] unneeded typecast
[GFS2] better code for translating characters
[GFS2] fixed a NULL pointer assignment BUG
Jesper Juhl (1):
[GFS2] Clean up duplicate includes in fs/gfs2/
Josef Whiter (1):
[GFS2] Fix calculation of demote state
Patrick Caulfield (3):
[DLM] Fix lowcomms socket closing
[DLM] Make dlm_sendd cond_resched more
[DLM] don't overwrite castparam if it's NULL
Steve French (1):
[GFS2] GFS2 not checking pointer on create when running under nfsd
Steven Whitehouse (16):
[GFS2] Fix two races relating to glock callbacks
[GFS2] Fix an oops in glock dumping
[GFS2] Reduce number of gfs2_scand processes to one
[GFS2] Clean up invalidatepage/releasepage
[GFS2] Add a missing gfs2_trans_add_bh()
[GFS2] Correct lock ordering in unlink
[GFS2] Introduce gfs2_remove_from_ail
[GFS2] Don't mark jdata dirty in gfs2_unstuffer_page()
[GFS2] Move pin/unpin into lops.c, clean up locking
[GFS2] Clean up ordered write code
[GFS2] Replace revoke structure with bufdata structure
[GFS2] Use slab operations for all gfs2_bufdata allocations
[GFS2] Clean up gfs2_trans_add_revoke()
[GFS2] Clean up journaled data writing
[GFS2] Don't try to remove buffers that don't exist
[GFS2] Get superblock a different way
Wendy Cheng (4):
[GFS2] Reduce truncate IO traffic
[GFS2] fix inode meta data corruption
[GFS2] Move inode deletion out of blocking_cb
[GFS2] Data corruption fix
fs/dlm/dlm_internal.h | 1 +
fs/dlm/lock.c | 142 +++++++-----
fs/dlm/lock.h | 3 +-
fs/dlm/lockspace.c | 1 +
fs/dlm/lowcomms.c | 23 +--
fs/dlm/member.c | 41 +++--
fs/dlm/midcomms.c | 17 +--
fs/dlm/rcom.c | 36 +---
fs/dlm/rcom.h | 5 +-
fs/dlm/recoverd.c | 11 +-
fs/dlm/requestqueue.c | 58 ++---
fs/dlm/requestqueue.h | 4 +-
fs/gfs2/bmap.c | 35 +++-
fs/gfs2/daemon.c | 24 --
fs/gfs2/daemon.h | 1 -
fs/gfs2/dir.c | 3 +-
fs/gfs2/eaops.c | 8 +-
fs/gfs2/eaops.h | 4 +-
fs/gfs2/glock.c | 293 ++++++++++++++++---------
fs/gfs2/glock.h | 5 +-
fs/gfs2/glops.c | 24 +--
fs/gfs2/incore.h | 31 ++--
fs/gfs2/inode.c | 78 ++++++-
fs/gfs2/inode.h | 3 +-
fs/gfs2/locking/dlm/lock_dlm.h | 1 -
fs/gfs2/locking/dlm/plock.c | 11 +-
fs/gfs2/locking/dlm/thread.c | 20 +-
fs/gfs2/locking/nolock/main.c | 1 -
fs/gfs2/log.c | 230 +++++++++++++-------
fs/gfs2/log.h | 2 +
fs/gfs2/lops.c | 470 ++++++++++++++++++++--------------------
fs/gfs2/main.c | 3 +
fs/gfs2/meta_io.c | 136 +++---------
fs/gfs2/meta_io.h | 6 +-
fs/gfs2/mount.c | 5 +-
fs/gfs2/ops_address.c | 146 ++++---------
fs/gfs2/ops_export.c | 2 +-
fs/gfs2/ops_file.c | 13 +-
fs/gfs2/ops_fstype.c | 40 ++--
fs/gfs2/ops_inode.c | 38 +++-
fs/gfs2/ops_super.c | 14 +-
fs/gfs2/quota.c | 13 +
fs/gfs2/recovery.c | 2 +-
fs/gfs2/rgrp.c | 39 ++--
fs/gfs2/super.c | 1 -
fs/gfs2/sys.c | 2 -
fs/gfs2/trans.c | 22 +-
fs/gfs2/trans.h | 2 +-
include/linux/gfs2_ondisk.h | 30 +++-
49 files changed, 1139 insertions(+), 961 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2007-10-12 7:47 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-14 9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] fix NULL ls usage swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] zero unused parts of sockaddr_storage swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] More othercon fixes swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [DLM] fix basts for granted PR waiting CW swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup detected in databuf_lo_before_commit swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup in rgblk_search swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect return code in rgrp.c swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect error path in prepare_write() swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix setting of inherit jdata attr swhiteho
2007-08-14 9:47 ` [Cluster-devel] [PATCH] [GFS2] Revert remounting w/o acl option leaves acls enabled swhiteho
2007-08-14 10:08 ` [Cluster-devel] [GFS2/DLM] [0/12] Pre pull request patch posting Steven Whitehouse
2007-08-14 16:44 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
-- strict thread matches above, loose matches on Subject: below --
2007-10-04 8:48 [Cluster-devel] [GFS2/DLM] Pre-pull patch posting swhiteho
2007-10-12 7:47 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
2007-07-09 16:02 [Cluster-devel] [GFS2/DLM] Pre-pull Patch Posting swhiteho
2007-07-10 7:50 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
2007-06-18 14:54 [Cluster-devel] [GFS2/DLM] Some small bug fixes Steven Whitehouse
2007-06-18 15:13 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
2007-06-18 15:30 ` Steven Whitehouse
2007-05-01 9:56 [Cluster-devel] [GFS2] Patches for the current merge window [0/34] Steven Whitehouse
2007-05-01 14:11 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
2007-03-07 14:25 [Cluster-devel] [GFS2/DLM] Bug fixes [0/12] Steven Whitehouse
2007-03-07 14:43 ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).