[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4dd1fe21e11344e5969bb112e954affb@jd.com>
Date: Wed, 10 Jul 2019 18:43:20 +0000
From: 黄乐 <huangle1@...com>
To: "bfields@...ldses.org" <bfields@...ldses.org>
CC: "jlayton@...nel.org" <jlayton@...nel.org>,
"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nfsd4: fix a deadlock on state owner replay mutex
It's safe because when we reach move_to_close_lru(), we know we are the
*logical* last call among all racing calls, it is actually the reason we
do the waiting here at fist place. Now just because of racing, we gain
the rp_mutex first and have a *lower* seqid value, so it is what we need
exactly to let the seqid bump with other racing calls before we continue,
that ensures possible future CLOSE call could be replayed correctly.
On Wed, Jul 10, 2019, bfields@...ldses.org wrote:
> I don't understand why that's safe. Maybe it is, but I don't understand
> yet. If we take the mutex, bump the seqid, drop the mutex, someone else
> comes in and bumps the seqid again, then we reacquire the mutex... what
> happens?
>
> --b.
Powered by blists - more mailing lists