From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 Patch] bz458289: rm on multiple nodes causes panic
Date: Tue, 12 Aug 2008 10:10:04 +0100 [thread overview]
Message-ID: <1218532204.3426.3.camel@localhost.localdomain> (raw)
In-Reply-To: <1218531200.3426.1.camel@localhost.localdomain>
Hi,
Actually now I read the code again, I think its your diff thats
backwards :-) Can you send me one the other way around?
Steve.
On Tue, 2008-08-12 at 09:53 +0100, Steven Whitehouse wrote:
> Hi,
>
> This looks like the correct lock order to me. I guess it must be the
> "other" process thats violating the correct order?
>
> Steve.
>
> On Mon, 2008-08-11 at 22:41 -0500, Bob Peterson wrote:
> > This patch fixes a problem whereby simultaneous delete operations
> > (e.g. rm -fR *) from multiple nodes on the same GFS2 file system
> > can cause kernel panics, hangs, and/or memory corruption.
> >
> > Regards,
> >
> > Bob Peterson
> >
> > Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> > --
> > fs/gfs2/ops_inode.c | 24 ++++++------------------
> > 1 files changed, 6 insertions(+), 18 deletions(-)
> >
> > diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
> > index e2c62f7..a072c9a 100644
> > --- a/fs/gfs2/ops_inode.c
> > +++ b/fs/gfs2/ops_inode.c
> > @@ -288,25 +288,17 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
> > gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2);
> >
> >
> > - error = gfs2_glock_nq(ghs); /* parent */
> > - if (error)
> > - goto out_parent;
> > -
> > - error = gfs2_glock_nq(ghs + 1); /* child */
> > - if (error)
> > - goto out_child;
> > -
> > - error = gfs2_glock_nq(ghs + 2); /* rgrp */
> > + error = gfs2_glock_nq_m(3, ghs);
> > if (error)
> > - goto out_rgrp;
> > + goto out;
> >
> > error = gfs2_unlink_ok(dip, &dentry->d_name, ip);
> > if (error)
> > - goto out_rgrp;
> > + goto out;
> >
> > error = gfs2_trans_begin(sdp, 2*RES_DINODE + RES_LEAF + RES_RG_BIT, 0);
> > if (error)
> > - goto out_rgrp;
> > + goto out;
> >
> > error = gfs2_dir_del(dip, &dentry->d_name);
> > if (error)
> > @@ -316,14 +308,10 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
> >
> > out_end_trans:
> > gfs2_trans_end(sdp);
> > - gfs2_glock_dq(ghs + 2);
> > -out_rgrp:
> > +out:
> > + gfs2_glock_dq_m(3, ghs);
> > gfs2_holder_uninit(ghs + 2);
> > - gfs2_glock_dq(ghs + 1);
> > -out_child:
> > gfs2_holder_uninit(ghs + 1);
> > - gfs2_glock_dq(ghs);
> > -out_parent:
> > gfs2_holder_uninit(ghs);
> > gfs2_glock_dq_uninit(&ri_gh);
> > return error;
> >
> >
>
next prev parent reply other threads:[~2008-08-12 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-12 3:41 [Cluster-devel] [GFS2 Patch] bz458289: rm on multiple nodes causes panic Bob Peterson
2008-08-12 8:53 ` Steven Whitehouse
2008-08-12 9:10 ` Steven Whitehouse [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-12 18:39 Bob Peterson
2008-08-13 10:18 ` Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1218532204.3426.3.camel@localhost.localdomain \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox