Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Dai Ngo <dai.ngo@oracle.com>
Cc: chuck.lever@oracle.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 1/1] Add pynfs4.0 release lockowner test RLOWN2
Date: Sat, 28 May 2022 16:18:52 -0400	[thread overview]
Message-ID: <20220528201852.GD9929@fieldses.org> (raw)
In-Reply-To: <1653341570-22461-1-git-send-email-dai.ngo@oracle.com>

Applied, thanks.--b.

On Mon, May 23, 2022 at 02:32:50PM -0700, Dai Ngo wrote:
> Add RLOWN2, similar to RLOWN1 but remove the file before release
> lockowner. This test is to exercise to code path causing problem
> of being blocked in nfsd_file_put while holding the cl_client lock.
> 
> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
> ---
>  nfs4.0/servertests/st_releaselockowner.py | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/nfs4.0/servertests/st_releaselockowner.py b/nfs4.0/servertests/st_releaselockowner.py
> index ccd10ff..2c83f99 100644
> --- a/nfs4.0/servertests/st_releaselockowner.py
> +++ b/nfs4.0/servertests/st_releaselockowner.py
> @@ -24,3 +24,28 @@ def testFile(t, env):
>      owner = lock_owner4(c.clientid, b"lockowner_RLOWN1")
>      res = c.compound([op.release_lockowner(owner)])
>      check(res)
> +
> +def testFile2(t, env):
> +    """RELEASE_LOCKOWNER 2 - same as basic test but remove
> +    file before release lockowner.
> +
> +    FLAGS: releaselockowner all
> +    DEPEND:
> +    CODE: RLOWN2
> +    """
> +    c = env.c1
> +    c.init_connection()
> +    fh, stateid = c.create_confirm(t.word())
> +    res = c.lock_file(t.word(), fh, stateid, lockowner=b"lockowner_RLOWN2")
> +    check(res)
> +    res = c.unlock_file(1, fh, res.lockid)
> +    check(res)
> +
> +    ops = c.use_obj(c.homedir) + [op.remove(t.word())]
> +    res = c.compound(ops)
> +    check(res)
> +
> +    # Release lockowner
> +    owner = lock_owner4(c.clientid, b"lockowner_RLOWN2")
> +    res = c.compound([op.release_lockowner(owner)])
> +    check(res)
> -- 
> 1.8.3.1

      reply	other threads:[~2022-05-28 20:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 21:32 [PATCH v2 1/1] Add pynfs4.0 release lockowner test RLOWN2 Dai Ngo
2022-05-28 20:18 ` J. Bruce Fields [this message]

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=20220528201852.GD9929@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /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