Commit 6dcfcfd6 authored by Andy Grover's avatar Andy Grover Committed by Luis Henriques

target/user: Fix comments to not refer to data ring

BugLink: http://bugs.launchpad.net/bugs/1646204

We no longer use a ringbuffer for the data area, so this might cause
confusion. Just call it the data area.
Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
(back ported from linux-next commit 3d9b9555)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>

Conflicts:
	drivers/target/target_core_user.c
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 47561ccd
......@@ -92,7 +92,7 @@ struct tcmu_dev {
size_t dev_size;
u32 cmdr_size;
u32 cmdr_last_cleaned;
/* Offset of data ring from start of mb */
/* Offset of data area from start of mb */
size_t data_off;
size_t data_size;
/* Ring head + tail values. */
......@@ -339,7 +339,7 @@ static void gather_and_free_data_area(struct tcmu_dev *udev,
/*
* We can't queue a command until we have space available on the cmd ring *and*
* space available on the data ring.
* space available on the data area.
*
* Called with ring lock held.
*/
......@@ -473,9 +473,7 @@ tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
entry->hdr.kflags = 0;
entry->hdr.uflags = 0;
/*
* Fix up iovecs, and handle if allocation in data ring wrapped.
*/
/* Handle allocating space from the data area */
iov = &entry->req.iov[0];
iov_cnt = 0;
copy_to_data_area = (se_cmd->data_direction == DMA_TO_DEVICE
......@@ -542,8 +540,10 @@ static void tcmu_handle_completion(struct tcmu_cmd *cmd, struct tcmu_cmd_entry *
struct tcmu_dev *udev = cmd->tcmu_dev;
if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags)) {
/* cmd has been completed already from timeout, just reclaim data
ring space */
/*
* cmd has been completed already from timeout, just reclaim
* data area space and free cmd
*/
UPDATE_HEAD(udev->data_tail, cmd->data_length, udev->data_size);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment