Some small bug fixes
Hi,
The following patches are the bug fix patches in the current GFS2 -nmw git tree which I've extracted into the -fixes tree since they are relatively small and self contained. They are relative to 2.6.22-rc5,
Steve.
PATCH 1/4 flush the glock completely in inode_go_sync
Fix for bz #231910
When filemap_fdatawrite() is called on the inode mapping in data=ordered mode, it will add the glock to the log. In inode_go_sync(), if you do the gfs2_log_flush() before this, after the filemap_fdatawrite() call, the glock and its associated data buffers will be on the log again. This means you can demote a lock from exclusive, without having it flushed from the log. The attached patch simply moves the gfs2_log_flush up to after the filemap_fdatawrite() call.
Originally, I tried moving the gfs2_log_flush to after gfs2_meta_sync(), but that caused me to trip the following assert.
GFS2: fsid=cypher-36:test.0: fatal: assertion "!buffer_busy(bh)" failed
GFS2: fsid=cypher-36:test.0: function = gfs2_ail_empty_gl, file = fs/gfs2/glops.c, line = 61
It appears that gfs2_log_flush() puts some of the glocks buffers in the busy state and the filemap_fdatawrite() call is necessary to flush them. This makes me worry slightly that a related problem could happen because of moving the gfs2_log_flush() after the initial filemap_fdatawrite(), but I assume that gfs2_ail_empty_gl() would catch that case as well.
--- fs/gfs2/glops.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e92666ae590962682cf23fcae2c3bdcb6e5e2d27.diff
Type: text/x-patch
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/65bbac21/attachment.bin>
PATCH 2/4 fix a couple of races
Fix two races in fs/dlm/config.c:
(1) Grab the configfs subsystem semaphore before calling config_group_find_obj() in get_space(). This solves a potential race between get_space() and concurrent mkdir(2) or rmdir(2).
(2) Grab a reference on the found config_item _while_ holding the configfs subsystem semaphore in get_comm(), and not after it. This solves a potential race between get_comm() and concurrent rmdir(2).
--- fs/dlm/config.c | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1f692e48dd1f3fa00629c69b2e34ab35c9929b45.diff
Type: text/x-patch
Size: 1066 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/badca0be/attachment.bin>
PATCH 3/4 use zero_user_page
Use zero_user_page() instead of open-coding it.
--- fs/gfs2/bmap.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5f8edce5584b74bbe25c240ffe7a55934e8cb9de.diff
Type: text/x-patch
Size: 782 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/f018165b/attachment.bin>
PATCH 4/4 keep dlm from panicing when traversing rsb list in debugfs
This problem was originally reported against GFS6.1, but the same issue exists in upstream DLM. This patch keeps the rsb iterator assigning under the rsbtbl list lock. Each time we process an rsb we grab a reference to it to make sure it is not freed out from underneath us, and then put it when we get the next rsb in the list or move onto another list.
--- fs/dlm/debug_fs.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b366510ec8e4fcf5a918a0c9fc1ba967d543838b.diff
Type: text/x-patch
Size: 1326 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/f89d0ea7/attachment.bin>
[GFS2/DLM] Pull request
In reply to Steven WhitehouseHi,
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(-)
Re: [Cluster-devel] [GFS2/DLM] Pull request
Hi,
Quoted 6 lines · Steven Whitehouse
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(-)