From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicholas Bellinger <nab@linux-iscsi.org>,
Asias He <asias@redhat.com>
Subject: linux-next: manual merge of the vhost tree with the target-updates tree
Date: Mon, 8 Jul 2013 13:47:21 +1000 [thread overview]
Message-ID: <20130708134721.8ac2d67125b60c745d46006f@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3411 bytes --]
Hi Michael,
Today's linux-next merge of the vhost tree got a conflict in
drivers/vhost/scsi.c between commit 084ed45b3846 ("vhost/scsi: Convert to
se_cmd->cmd_kref TARGET_SCF_ACK_KREF usage") from the target-updates tree
and commit 3c63f66a0dcd ("vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd
to *cmd") from the vhost tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/vhost/scsi.c
index b351938,4264840..0000000
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@@ -446,19 -448,7 +448,19 @@@ static u32 tcm_vhost_tpg_get_inst_index
static void tcm_vhost_release_cmd(struct se_cmd *se_cmd)
{
- struct tcm_vhost_cmd *tv_cmd = container_of(se_cmd,
- return;
++ struct tcm_vhost_cmd *cmd = container_of(se_cmd,
+ struct tcm_vhost_cmd, tvc_se_cmd);
+
- if (tv_cmd->tvc_sgl_count) {
++ if (cmd->tvc_sgl_count) {
+ u32 i;
- for (i = 0; i < tv_cmd->tvc_sgl_count; i++)
- put_page(sg_page(&tv_cmd->tvc_sgl[i]));
++ for (i = 0; i < cmd->tvc_sgl_count; i++)
++ put_page(sg_page(&cmd->tvc_sgl[i]));
+
- kfree(tv_cmd->tvc_sgl);
++ kfree(cmd->tvc_sgl);
+ }
+
- tcm_vhost_put_inflight(tv_cmd->inflight);
- kfree(tv_cmd);
++ tcm_vhost_put_inflight(cmd->inflight);
++ kfree(cmd);
}
static int tcm_vhost_shutdown_session(struct se_session *se_sess)
@@@ -564,22 -555,28 +567,22 @@@ tcm_vhost_allocate_evt(struct vhost_scs
return evt;
}
- static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd)
+ static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *cmd)
{
- struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd;
+ struct se_cmd *se_cmd = &cmd->tvc_se_cmd;
/* TODO locking against target/backend threads? */
- transport_generic_free_cmd(se_cmd, 1);
+ transport_generic_free_cmd(se_cmd, 0);
- if (cmd->tvc_sgl_count) {
- u32 i;
- for (i = 0; i < cmd->tvc_sgl_count; i++)
- put_page(sg_page(&cmd->tvc_sgl[i]));
-
- kfree(cmd->tvc_sgl);
- }
-
- tcm_vhost_put_inflight(cmd->inflight);
+}
- kfree(cmd);
+static int vhost_scsi_check_stop_free(struct se_cmd *se_cmd)
+{
+ return target_put_sess_cmd(se_cmd->se_sess, se_cmd);
}
- static void tcm_vhost_do_evt_work(struct vhost_scsi *vs,
- struct tcm_vhost_evt *evt)
+ static void
+ tcm_vhost_do_evt_work(struct vhost_scsi *vs, struct tcm_vhost_evt *evt)
{
struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq;
struct virtio_scsi_event *event = &evt->event;
@@@ -847,13 -850,13 +856,13 @@@ static void tcm_vhost_submission_work(s
} else {
sg_ptr = NULL;
}
- tv_nexus = tv_cmd->tvc_nexus;
+ tv_nexus = cmd->tvc_nexus;
rc = target_submit_cmd_map_sgls(se_cmd, tv_nexus->tvn_se_sess,
- tv_cmd->tvc_cdb, &tv_cmd->tvc_sense_buf[0],
- tv_cmd->tvc_lun, tv_cmd->tvc_exp_data_len,
- tv_cmd->tvc_task_attr, tv_cmd->tvc_data_direction,
- TARGET_SCF_ACK_KREF, sg_ptr, tv_cmd->tvc_sgl_count,
+ cmd->tvc_cdb, &cmd->tvc_sense_buf[0],
+ cmd->tvc_lun, cmd->tvc_exp_data_len,
+ cmd->tvc_task_attr, cmd->tvc_data_direction,
- 0, sg_ptr, cmd->tvc_sgl_count,
++ TARGET_SCF_ACK_KREF, sg_ptr, cmd->tvc_sgl_count,
sg_bidi_ptr, sg_no_bidi);
if (rc < 0) {
transport_send_check_condition_and_sense(se_cmd,
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2013-07-08 3:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 3:47 Stephen Rothwell [this message]
2013-07-09 1:13 ` Nicholas A. Bellinger
2013-07-09 3:27 ` Stephen Rothwell
2013-07-09 6:12 ` Nicholas A. Bellinger
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=20130708134721.8ac2d67125b60c745d46006f@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=asias@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mst@redhat.com \
--cc=nab@linux-iscsi.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
all inboxes | Powered by JetHome®