* [Cluster-devel] [GFS2] Pre-pull patch posting (fixes)
@ 2010-02-02 9:47 Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 1/4] GFS2: Fix refcnt leak on gfs2_follow_link() error path Steven Whitehouse
0 siblings, 1 reply; 5+ messages in thread
From: Steven Whitehouse @ 2010-02-02 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Here is the latest set of GFS2 fixes. They are all fairly small,
Steve.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Cluster-devel] [PATCH 1/4] GFS2: Fix refcnt leak on gfs2_follow_link() error path
2010-02-02 9:47 [Cluster-devel] [GFS2] Pre-pull patch posting (fixes) Steven Whitehouse
@ 2010-02-02 9:47 ` Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 2/4] GFS2: Don't withdraw on partial rindex entries Steven Whitehouse
0 siblings, 1 reply; 5+ messages in thread
From: Steven Whitehouse @ 2010-02-02 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
If ->follow_link handler return the error, it should decrement
nd->path refcnt.
This patch fix it.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/ops_inode.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index 78f73ca..84350e1 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -1088,7 +1088,8 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd)
error = vfs_follow_link(nd, buf);
if (buf != array)
kfree(buf);
- }
+ } else
+ path_put(&nd->path);
return ERR_PTR(error);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Cluster-devel] [PATCH 2/4] GFS2: Don't withdraw on partial rindex entries
2010-02-02 9:47 ` [Cluster-devel] [PATCH 1/4] GFS2: Fix refcnt leak on gfs2_follow_link() error path Steven Whitehouse
@ 2010-02-02 9:47 ` Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 3/4] GFS2: Fix previous patch Steven Whitehouse
0 siblings, 1 reply; 5+ messages in thread
From: Steven Whitehouse @ 2010-02-02 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Benjamin Marzinski <bmarzins@redhat.com>
ince gfs2 writes the rindex file a block at a time, and releases the
exclusive lock after each block, it is possible that another process
will grab the lock in the middle of the write. Since rindex entries are
not an even divisor of blocks, that other process may see partial
entries. On grows, this is fine. The process can simply ignore the the
partial entires. Previously, the code withdrew when it saw partial
entries. Now it simply ignores them.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/rgrp.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 0608f49..6702b82 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -591,11 +591,6 @@ static int gfs2_ri_update(struct gfs2_inode *ip)
u64 rgrp_count = ip->i_disksize;
int error;
- if (do_div(rgrp_count, sizeof(struct gfs2_rindex))) {
- gfs2_consist_inode(ip);
- return -EIO;
- }
-
clear_rgrpdi(sdp);
file_ra_state_init(&ra_state, inode->i_mapping);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Cluster-devel] [PATCH 3/4] GFS2: Fix previous patch
2010-02-02 9:47 ` [Cluster-devel] [PATCH 2/4] GFS2: Don't withdraw on partial rindex entries Steven Whitehouse
@ 2010-02-02 9:47 ` Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 4/4] GFS2: Use GFP_NOFS for alloc structure Steven Whitehouse
0 siblings, 1 reply; 5+ messages in thread
From: Steven Whitehouse @ 2010-02-02 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
The do_div() call needs to remain.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/rgrp.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 6702b82..46534a5 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -591,6 +591,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip)
u64 rgrp_count = ip->i_disksize;
int error;
+ do_div(rgrp_count, sizeof(struct gfs2_rindex));
clear_rgrpdi(sdp);
file_ra_state_init(&ra_state, inode->i_mapping);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Cluster-devel] [PATCH 4/4] GFS2: Use GFP_NOFS for alloc structure
2010-02-02 9:47 ` [Cluster-devel] [PATCH 3/4] GFS2: Fix previous patch Steven Whitehouse
@ 2010-02-02 9:47 ` Steven Whitehouse
0 siblings, 0 replies; 5+ messages in thread
From: Steven Whitehouse @ 2010-02-02 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
This is called under a glock, so its a good plan to use GFP_NOFS
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/rgrp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 46534a5..503b842 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -911,7 +911,7 @@ void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd)
struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip)
{
BUG_ON(ip->i_alloc != NULL);
- ip->i_alloc = kzalloc(sizeof(struct gfs2_alloc), GFP_KERNEL);
+ ip->i_alloc = kzalloc(sizeof(struct gfs2_alloc), GFP_NOFS);
return ip->i_alloc;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-02 9:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 9:47 [Cluster-devel] [GFS2] Pre-pull patch posting (fixes) Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 1/4] GFS2: Fix refcnt leak on gfs2_follow_link() error path Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 2/4] GFS2: Don't withdraw on partial rindex entries Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 3/4] GFS2: Fix previous patch Steven Whitehouse
2010-02-02 9:47 ` [Cluster-devel] [PATCH 4/4] GFS2: Use GFP_NOFS for alloc structure 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).