All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Volodymyr Khomenko <volodymyr@vastdata.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] pynfs minor: fixed Environment._maketree to use proper stateid during file write
Date: Wed, 26 Jan 2022 09:10:53 -0500	[thread overview]
Message-ID: <20220126141053.GA29832@fieldses.org> (raw)
In-Reply-To: <CANkgwes_79iE9MGvzGu_tLjNVZprTjTMNzohADRU6pw4Z3xC_w@mail.gmail.com>

On Fri, Jan 21, 2022 at 03:06:57PM +0200, Volodymyr Khomenko wrote:
> 

> From 63c0711f9cd8f8c0aaff7d0116a42b5001bddcd2 Mon Sep 17 00:00:00 2001
> From: Volodymyr Khomenko <Khomenko.Volodymyr@gmail.com>
> Date: Fri, 21 Jan 2022 14:52:28 +0200
> Subject: [PATCH] Minor: fixed Environment._maketree (used by init) to use
>  proper stateid during file write
> 
> _maketree is a part of generic init sequence for server41tests so the code should be generic.
> Using zero stateid (when "other" and "seqid" are both zero, the stateid is treated
> as a special anonymous stateid) is a special use-case of anonymous access
> so it must not be used during generic initialization.

OK, applying, but I'm a little wary.  If a server isn't accepting the
zero stateid here then I think that's a server bug.

--b.

> 
> Signed-off-by: Volodymyr Khomenko <Khomenko.Volodymyr@gmail.com>
> ---
>  nfs4.1/server41tests/environment.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py
> index 14b0902..0b7c976 100644
> --- a/nfs4.1/server41tests/environment.py
> +++ b/nfs4.1/server41tests/environment.py
> @@ -198,7 +198,7 @@ class Environment(testmod.Environment):
>                  log.warning("could not create /%s" % b'/'.join(path))
>          # Make file-object in /tree
>          fh, stateid = create_confirm(sess, b'maketree', tree + [b'file'])
> -        res = write_file(sess, fh, self.filedata)
> +        res = write_file(sess, fh, self.filedata, stateid=stateid)
>          check(res, msg="Writing data to /%s/file" % b'/'.join(tree))
>          res = close_file(sess, fh, stateid)
>          check(res)
> -- 
> 2.25.1
> 


  reply	other threads:[~2022-01-26 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 13:06 [PATCH] pynfs minor: fixed Environment._maketree to use proper stateid during file write Volodymyr Khomenko
2022-01-26 14:10 ` J. Bruce Fields [this message]
2022-01-26 15:29   ` Frank Filz
2022-01-27  8:10     ` Volodymyr Khomenko

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=20220126141053.GA29832@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=volodymyr@vastdata.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.