GFS2: Pull request (fixes)
Hi,
Please consider pulling the following GFS2 bug fixes,
Steve.
------------------------------------------------------------------------------
The following changes since commit e6f597a1425b5af64917be3448b29e2d5a585ac8:
staging: fix build failure in bcm driver (2011-01-17 17:39:39 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git master
Benjamin Marzinski (1):
GFS2: remove iopen glocks from cache on failed deletes
Steven Whitehouse (1):
GFS2: Fix error path in gfs2_lookup_by_inum()
fs/gfs2/inode.c | 72 ++++++++++++++++-------------------------------------- fs/gfs2/inode.h | 1 - fs/gfs2/super.c | 1 + 3 files changed, 23 insertions(+), 51 deletions(-)
-----------------------------------------------------------------------------
Quoted 1 line
From
23c3010808de86f21436eb822aacfa551bfc17e4Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <[email protected]>
Date: Fri, 14 Jan 2011 22:39:16 -0600
Subject: [PATCH 1/2] GFS2: remove iopen glocks from cache on failed deletes
When a file gets deleted on GFS2, if a node can't get an exclusive lock on the file's iopen glock, it punts on actually freeing up the space, because another node is using the file. When it does this, it needs to drop the iopen glock from its cache so that the other node can get an exclusive lock on it. Now, gfs2_delete_inode() sets GL_NOCACHE before dropping the shared lock on the iopen glock in preparation for grabbing it in the exclusive state. Since the node needs the glock in the exclusive state, dropping the shared lock from the cache doesn't slow down the case where no other nodes are using the file.
fs/gfs2/super.c +1 -0
@@ -1336,6 +1336,7 @@ static void gfs2_evict_inode(struct inode *inode)if (error) goto out_truncate; + ip->i_iopen_gh.gh_flags |=GL_NOCACHE ;gfs2_glock_dq_wait (&ip->i_iopen_gh);gfs2_holder_reinit (LM_ST_EXCLUSIVE ,LM_FLAG_TRY_1CB |GL_NOCACHE , &ip->i_iopen_gh); error =gfs2_glock_nq (&ip->i_iopen_gh);
Signature · 3 lines
1.7.3.3 ------------------------------------------------------------------------------
Quoted 1 line
From
24d9765fc18c7838ccdbb0d71fb706321d9b824cMon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
Date: Tue, 18 Jan 2011 14:49:08 +0000
Subject: [PATCH 2/2] GFS2: Fix error path in gfs2_lookup_by_inum()
In the (impossible, except if there is fs corruption) error path in gfs2_lookup_by_inum() if the call to gfs2_inode_refresh() fails, it was leaving the function by calling iput() rather than iget_failed(). This would cause future lookups of the same inode to block forever.
This patch fixes the problem by moving the call to gfs2_inode_refresh() into gfs2_inode_lookup() where iget_failed() is part of the error path already. Also this cleans up some unreachable code and makes gfs2_set_iop() static.
fs/gfs2/inode.c +22 -50
121 lines not on this page · raw message
fs/gfs2/inode.h +0 -1
@@ -96,7 +96,6 @@ err:return -EIO ; } -extern void gfs2_set_iop (struct inode *inode);extern struct inode *gfs2_inode_lookup (struct super_block *sb,unsigned type,u64 no_addr,u64 no_formal_ino); extern struct inode *gfs2_lookup_by_inum(struct gfs2_sbd *sdp, u64 no_addr,
Signature · 1 line
1.7.3.3