[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHc6FU4Wb-QvRC_VN8iay8YcikBBvVwYLf5JfEy_jAm4Z+Md8A@mail.gmail.com>
Date: Thu, 29 Mar 2018 00:58:49 +0200
From: Andreas Gruenbacher <agruenba@...hat.com>
To: NeilBrown <neilb@...e.com>
Cc: cluster-devel <cluster-devel@...hat.com>, netdev@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, Thomas Graf <tgraf@...g.ch>,
Herbert Xu <herbert@...dor.apana.org.au>,
Tom Herbert <tom@...ntonium.net>
Subject: Re: [PATCH] gfs2: Stop using rhashtable_walk_peek
On 28 March 2018 at 23:53, NeilBrown <neilb@...e.com> wrote:
> Thank for this patch!
> The above looks a bit fragile to me.
> gfs2_glock_iter_next() (And hence gfs2_glock_seq_start()) will sometimes
> exit with gl_held true, and sometimes with it false.
> gfs2_glock_seq_stop() assumes that it is false.
> Normally gfs2_glock_seq_next() will normally be called between these
> two and will clear gl_held, but I don't think there is a hard guarantee
> of that.
> Maybe we should always 'put' gi->gl in iter_next if gl_held??
Another problem is that gfs2_glock_seq_stop only does a lockref_get
which is not allowed because the lockref may have been marked dead in
the meantime. We'll have to take a reference on each lock in
gfs2_glock_iter_next instead. Revised patch to follow tomorrow.
Thanks,
Andreas
Powered by blists - more mailing lists