From: Christoph Hellwig <hch@lst.de>
To: Dai Ngo <dai.ngo@oracle.com>
Cc: chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de,
okorniev@redhat.com, tom@talpey.com, hch@lst.de,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] NFSD: Fix problem with nfsd4_scsi_fence_client using the wrong reservation type
Date: Thu, 30 Oct 2025 06:55:09 +0100 [thread overview]
Message-ID: <20251030055509.GA12657@lst.de> (raw)
In-Reply-To: <20251029232917.2212873-1-dai.ngo@oracle.com>
On Wed, Oct 29, 2025 at 04:28:26PM -0700, Dai Ngo wrote:
> The reservation type argument for the pr_preempt call should match the
> one used in nfsd4_block_get_device_info_scsi. Additionally, the pr_preempt
> operation only needs to be executed once per SCSI target.
One patch per change, please.
Also please add a Fixes: tag.
>
> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
> ---
> fs/nfsd/blocklayout.c | 17 +++++++++++++++--
> fs/nfsd/state.h | 1 +
> 2 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c
> index fde5539cf6a6..4ca6cb420736 100644
> --- a/fs/nfsd/blocklayout.c
> +++ b/fs/nfsd/blocklayout.c
> @@ -340,9 +340,22 @@ nfsd4_scsi_fence_client(struct nfs4_layout_stateid *ls, struct nfsd_file *file)
> {
> struct nfs4_client *clp = ls->ls_stid.sc_client;
> struct block_device *bdev = file->nf_file->f_path.mnt->mnt_sb->s_bdev;
> + int error;
> +
> + if (ls->ls_fenced)
> + return;
> + ls->ls_fenced = true;
What is used to serialize this?
> + ls->ls_fenced = false;
> + rpc_ntop((struct sockaddr *)&clp->cl_addr, addr_str, sizeof(addr_str));
Overly long line.
> + dprintk("nfsd: failed to fence client %s error %d\n",
> + addr_str, error);
> + }
Also the error printing is new without any rationale in the commit
message.
next prev parent reply other threads:[~2025-10-30 5:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 23:28 [PATCH 1/1] NFSD: Fix problem with nfsd4_scsi_fence_client using the wrong reservation type Dai Ngo
2025-10-30 5:55 ` Christoph Hellwig [this message]
2025-10-30 17:25 ` Dai Ngo
2025-10-30 13:33 ` Chuck Lever
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=20251030055509.GA12657@lst.de \
--to=hch@lst.de \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=tom@talpey.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.