linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@lst.de>
Cc: trond.myklebust@primarydata.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 4/4] nfsd: add SCSI layout support
Date: Fri, 11 Mar 2016 17:52:47 -0500	[thread overview]
Message-ID: <20160311225247.GA18755@fieldses.org> (raw)
In-Reply-To: <1457120777-30687-5-git-send-email-hch@lst.de>

On Fri, Mar 04, 2016 at 08:46:17PM +0100, Christoph Hellwig wrote:
> This is a simple extension to the block layout driver to use SCSI
> persistent reservations for access control and fencing, as well as
> SCSI VPD pages for device identification.
> 
> For this we need to pass the nfs4_client to the proc_getdeviceinfo method
> to generate the reservation key, and add a new fence_client method
> to allow for fence actions in the layout driver.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  Documentation/filesystems/nfs/pnfs-scsi-server.txt |  22 ++
>  fs/nfsd/Kconfig                                    |  13 +
>  fs/nfsd/Makefile                                   |   1 +
>  fs/nfsd/blocklayout.c                              | 298 ++++++++++++++++++---
>  fs/nfsd/blocklayoutxdr.c                           |  65 ++++-
>  fs/nfsd/blocklayoutxdr.h                           |  14 +
>  fs/nfsd/nfs4layouts.c                              |  27 +-
>  fs/nfsd/nfs4proc.c                                 |   6 +-
>  fs/nfsd/pnfs.h                                     |   6 +
>  fs/xfs/Makefile                                    |   1 +
>  fs/xfs/xfs_pnfs.h                                  |   2 +-
>  11 files changed, 407 insertions(+), 48 deletions(-)
>  create mode 100644 Documentation/filesystems/nfs/pnfs-scsi-server.txt
> 
> diff --git a/Documentation/filesystems/nfs/pnfs-scsi-server.txt b/Documentation/filesystems/nfs/pnfs-scsi-server.txt
> new file mode 100644
> index 0000000..4150979
> --- /dev/null
> +++ b/Documentation/filesystems/nfs/pnfs-scsi-server.txt
> @@ -665,7 +680,13 @@ nfsd4_cb_layout_done(struct nfsd4_callback *cb, struct rpc_task *task)
>  		/*
>  		 * Unknown error or non-responding client, we'll need to fence.
>  		 */
> -		nfsd4_cb_layout_fail(ls);
> +		trace_layout_recall_fail(&ls->ls_stid.sc_stateid);
> +
> +		ops = nfsd4_layout_ops[ls->ls_layout_type];
> +		if (ops->fence_client)
> +			ops->fence_client(ls);
> +		else
> +			nfsd4_cb_layout_fail(ls);
>  		return -1;

I'm still not happy about this fencing on callback failure.  I think we
discussed it before, but all I can find is a promise from me to finish
some pynfs tests for the right behavior.  Which I haven't done.

I'd have to think through the failure scenarios to figure out how likely
this is to bite us.

--b.

  parent reply	other threads:[~2016-03-11 22:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 19:46 pNFS SCSI layout support V2 Christoph Hellwig
2016-03-04 19:46 ` [PATCH 1/4] nfs4.h: add SCSI layout defintions Christoph Hellwig
2016-03-04 19:46 ` [PATCH 2/4] nfs/blocklayout: add SCSI layout support Christoph Hellwig
2016-03-08 22:07   ` J. Bruce Fields
2016-03-08 22:42     ` Trond Myklebust
2016-03-17 21:01       ` J. Bruce Fields
2016-03-18 14:18         ` Trond Myklebust
2016-03-08 22:09   ` J. Bruce Fields
2016-03-04 19:46 ` [PATCH 3/4] nfsd: add a new config option for the block layout driver Christoph Hellwig
2016-03-04 19:46 ` [PATCH 4/4] nfsd: add SCSI layout support Christoph Hellwig
2016-03-08 22:15   ` J. Bruce Fields
2016-03-09 14:48     ` Christoph Hellwig
2016-03-10 22:26   ` J. Bruce Fields
2016-03-11  9:24     ` Christoph Hellwig
2016-03-11 22:52   ` J. Bruce Fields [this message]
2016-03-17 21:52   ` J. Bruce Fields
2016-03-22 18:56     ` J. Bruce Fields

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=20160311225247.GA18755@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).