diff options
| author | Andy Grover <agrover@redhat.com> | 2016-08-25 11:55:54 -0400 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-10-20 00:22:23 -0400 |
| commit | 3d9b95558f5874ac5d63a057813dc66b480de7e1 (patch) | |
| tree | 33db4187400ebd629cfc6351b917f4ddfd6c6cb9 /drivers/target | |
| parent | 554617b2bbe25c3fb3c80c28fe7a465884bb40b1 (diff) | |
target/user: Fix comments to not refer to data ring
We no longer use a ringbuffer for the data area, so this might cause
confusion. Just call it the data area.
Signed-off-by: Andy Grover <agrover@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
| -rw-r--r-- | drivers/target/target_core_user.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 5de1eac17fed..47562509b489 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c | |||
| @@ -96,7 +96,7 @@ struct tcmu_dev { | |||
| 96 | size_t dev_size; | 96 | size_t dev_size; |
| 97 | u32 cmdr_size; | 97 | u32 cmdr_size; |
| 98 | u32 cmdr_last_cleaned; | 98 | u32 cmdr_last_cleaned; |
| 99 | /* Offset of data ring from start of mb */ | 99 | /* Offset of data area from start of mb */ |
| 100 | /* Must add data_off and mb_addr to get the address */ | 100 | /* Must add data_off and mb_addr to get the address */ |
| 101 | size_t data_off; | 101 | size_t data_off; |
| 102 | size_t data_size; | 102 | size_t data_size; |
| @@ -349,7 +349,7 @@ static inline size_t spc_bitmap_free(unsigned long *bitmap) | |||
| 349 | 349 | ||
| 350 | /* | 350 | /* |
| 351 | * We can't queue a command until we have space available on the cmd ring *and* | 351 | * We can't queue a command until we have space available on the cmd ring *and* |
| 352 | * space available on the data ring. | 352 | * space available on the data area. |
| 353 | * | 353 | * |
| 354 | * Called with ring lock held. | 354 | * Called with ring lock held. |
| 355 | */ | 355 | */ |
| @@ -436,7 +436,7 @@ tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd) | |||
| 436 | if ((command_size > (udev->cmdr_size / 2)) || | 436 | if ((command_size > (udev->cmdr_size / 2)) || |
| 437 | data_length > udev->data_size) { | 437 | data_length > udev->data_size) { |
| 438 | pr_warn("TCMU: Request of size %zu/%zu is too big for %u/%zu " | 438 | pr_warn("TCMU: Request of size %zu/%zu is too big for %u/%zu " |
| 439 | "cmd/data ring buffers\n", command_size, data_length, | 439 | "cmd ring/data area\n", command_size, data_length, |
| 440 | udev->cmdr_size, udev->data_size); | 440 | udev->cmdr_size, udev->data_size); |
| 441 | spin_unlock_irq(&udev->cmdr_lock); | 441 | spin_unlock_irq(&udev->cmdr_lock); |
| 442 | return TCM_INVALID_CDB_FIELD; | 442 | return TCM_INVALID_CDB_FIELD; |
| @@ -491,9 +491,7 @@ tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd) | |||
| 491 | 491 | ||
| 492 | bitmap_copy(old_bitmap, udev->data_bitmap, DATA_BLOCK_BITS); | 492 | bitmap_copy(old_bitmap, udev->data_bitmap, DATA_BLOCK_BITS); |
| 493 | 493 | ||
| 494 | /* | 494 | /* Handle allocating space from the data area */ |
| 495 | * Fix up iovecs, and handle if allocation in data ring wrapped. | ||
| 496 | */ | ||
| 497 | iov = &entry->req.iov[0]; | 495 | iov = &entry->req.iov[0]; |
| 498 | iov_cnt = 0; | 496 | iov_cnt = 0; |
| 499 | copy_to_data_area = (se_cmd->data_direction == DMA_TO_DEVICE | 497 | copy_to_data_area = (se_cmd->data_direction == DMA_TO_DEVICE |
| @@ -566,7 +564,7 @@ static void tcmu_handle_completion(struct tcmu_cmd *cmd, struct tcmu_cmd_entry * | |||
| 566 | if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags)) { | 564 | if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags)) { |
| 567 | /* | 565 | /* |
| 568 | * cmd has been completed already from timeout, just reclaim | 566 | * cmd has been completed already from timeout, just reclaim |
| 569 | * data ring space and free cmd | 567 | * data area space and free cmd |
| 570 | */ | 568 | */ |
| 571 | free_data_area(udev, cmd); | 569 | free_data_area(udev, cmd); |
| 572 | 570 | ||
