linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manoj Kumar <manoj@linux.vnet.ibm.com>
To: "Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>,
	linux-scsi@vger.kernel.org,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Uma Krishnan <ukrishn@linux.vnet.ibm.com>,
	Al Viro <viro@zeniv.linux.org.uk>
Cc: Christophe Lombard <clombard@linux.vnet.ibm.com>,
	Frederic Barrat <fbarrat@linux.vnet.ibm.com>,
	Ian Munsie <imunsie@au1.ibm.com>,
	Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	Brian King <brking@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/6] cxlflash: Cache owning adapter within context
Date: Thu, 18 Aug 2016 09:38:46 -0500	[thread overview]
Message-ID: <fbe021d3-3d7b-022b-c532-c14cdf993a3d@linux.vnet.ibm.com> (raw)
In-Reply-To: <1470785970-9192-1-git-send-email-mrochs@linux.vnet.ibm.com>

Acked-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>

On 8/9/2016 6:39 PM, Matthew R. Ochs wrote:
> The context removal routine requires access to the owning adapter
> structure to reset the context within the AFU as part of the tear
> down sequence. In order to support kref adoption, the owning adapter
> must be accessible from the release handler. As the kref framework
> only provides the kref reference as the sole parameter, another means
> is needed to derive the owning adapter.
>
> As a remedy, the owning adapter reference is saved off within the
> context during initialization.
>
> Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
> ---
>  drivers/scsi/cxlflash/superpipe.c | 1 +
>  drivers/scsi/cxlflash/superpipe.h | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c
> index ab5c893..640c3a2 100644
> --- a/drivers/scsi/cxlflash/superpipe.c
> +++ b/drivers/scsi/cxlflash/superpipe.c
> @@ -804,6 +804,7 @@ static void init_context(struct ctx_info *ctxi, struct cxlflash_cfg *cfg,
>  	ctxi->lfd = adap_fd;
>  	ctxi->pid = current->tgid; /* tgid = pid */
>  	ctxi->ctx = ctx;
> +	ctxi->cfg = cfg;
>  	ctxi->file = file;
>  	ctxi->initialized = true;
>  	mutex_init(&ctxi->mutex);
> diff --git a/drivers/scsi/cxlflash/superpipe.h b/drivers/scsi/cxlflash/superpipe.h
> index 5f9a091..61404f2 100644
> --- a/drivers/scsi/cxlflash/superpipe.h
> +++ b/drivers/scsi/cxlflash/superpipe.h
> @@ -107,6 +107,7 @@ struct ctx_info {
>  	bool err_recovery_active;
>  	struct mutex mutex; /* Context protection */
>  	struct cxl_context *ctx;
> +	struct cxlflash_cfg *cfg;
>  	struct list_head luns;	/* LUNs attached to this context */
>  	const struct vm_operations_struct *cxl_mmap_vmops;
>  	struct file *file;
>

  reply	other threads:[~2016-08-18 14:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 23:38 [PATCH 0/6] cxlflash: Improvements and cleanup Matthew R. Ochs
2016-08-09 23:39 ` [PATCH 1/6] cxlflash: Avoid mutex when destroying context Matthew R. Ochs
2016-08-17 23:22   ` Manoj Kumar
2016-08-09 23:39 ` [PATCH 2/6] cxlflash: Cache owning adapter within context Matthew R. Ochs
2016-08-18 14:38   ` Manoj Kumar [this message]
2016-08-09 23:39 ` [PATCH 3/6] cxlflash: Add kref to context Matthew R. Ochs
2016-08-18 18:38   ` Manoj Kumar
2016-08-09 23:39 ` [PATCH 4/6] cxlflash: Transition to application close model Matthew R. Ochs
2016-08-19  3:53   ` Manoj Kumar
2016-08-24  2:25   ` Martin K. Petersen
2016-08-09 23:40 ` [PATCH 5/6] cxlflash: Remove adapter file descriptor cache Matthew R. Ochs
2016-08-19 12:18   ` Manoj Kumar
2016-08-09 23:40 ` [PATCH 6/6] cxlflash: Update documentation Matthew R. Ochs
2016-08-19 12:18   ` Manoj Kumar
2016-08-19  2:43 ` [PATCH 0/6] cxlflash: Improvements and cleanup Martin K. Petersen

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=fbe021d3-3d7b-022b-c532-c14cdf993a3d@linux.vnet.ibm.com \
    --to=manoj@linux.vnet.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=clombard@linux.vnet.ibm.com \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=imunsie@au1.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=martin.petersen@oracle.com \
    --cc=mrochs@linux.vnet.ibm.com \
    --cc=ukrishn@linux.vnet.ibm.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).