#
e80ac6c4 |
| 12-Jul-2012 |
Andy Grover <agrover@redhat.com> |
target: refactor core_update_device_list_for_node()
Code was almost entirely divided based on value of bool param "enable".
Split it into two functions.
Signed-off-by: Andy Grover <agrover@redhat.
target: refactor core_update_device_list_for_node()
Code was almost entirely divided based on value of bool param "enable".
Split it into two functions.
Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
2dca673b |
| 12-Jul-2012 |
Andy Grover <agrover@redhat.com> |
target: Remove hba param from core_dev_add_lun
Only used in a debugprint, and function signature is cleaner now.
Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <n
target: Remove hba param from core_dev_add_lun
Only used in a debugprint, and function signature is cleaner now.
Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
af877292 |
| 08-Jul-2012 |
Christoph Hellwig <hch@infradead.org> |
target: replace the processing thread with a TMR work queue
The last functionality of the target processing thread is offloading possibly long running task management requests from the submitter con
target: replace the processing thread with a TMR work queue
The last functionality of the target processing thread is offloading possibly long running task management requests from the submitter context. To keep TMR semantics the same we need a single threaded ordered queue, which can be provided by a per-device workqueue with the right flags.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.5-rc6, v3.5-rc5, v3.5-rc4, v3.5-rc3, v3.5-rc2, v3.5-rc1, v3.4, v3.4-rc7 |
|
#
11e764bd |
| 09-May-2012 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target: Remove max_sectors device attribute for modern se_task less code
This patch removes the original usage of dev_attr->max_sectors in favor of dev_attr->hw_max_sectors that is now being enforce
target: Remove max_sectors device attribute for modern se_task less code
This patch removes the original usage of dev_attr->max_sectors in favor of dev_attr->hw_max_sectors that is now being enforced by target core from within transport_generic_cmd_sequencer() for SCF_SCSI_DATA_SG_IO_CDB ops.
After the recent se_task removal patches from hch, this value for IBLOCK backends being set via configfs by userspace from an saved max_sectors value that is turning out to be problematic, so it makes sense to go ahead and remove this now legacy attribute all-together.
This patch also continues to make se_dev_set_default_attribs() do (sectors / block_size) alignment for what actually get used by target_core_mod to be safe here, following the same alignment currently used by fabric_max_sectors.
Reported-by: Andy Grover <agrover@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.4-rc6, v3.4-rc5 |
|
#
6bb35e00 |
| 23-Apr-2012 |
Christoph Hellwig <hch@infradead.org> |
target: replace ->execute_task with ->execute_cmd
Make CDB emulation work on commands instead of tasks again as a preparation of removing tasks completely.
Signed-off-by: Christoph Hellwig <hch@lst
target: replace ->execute_task with ->execute_cmd
Make CDB emulation work on commands instead of tasks again as a preparation of removing tasks completely.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.4-rc4, v3.4-rc3, v3.4-rc2, v3.4-rc1 |
|
#
58d92618 |
| 20-Mar-2012 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target: Remove obsolete DF_READ_ONLY usage
This was used at one time as a hack by FILEIO backend registration to allow a struct block_device that was claimed with blkdev_get (by a local filesystem m
target: Remove obsolete DF_READ_ONLY usage
This was used at one time as a hack by FILEIO backend registration to allow a struct block_device that was claimed with blkdev_get (by a local filesystem mount for example) to be exported as read-only (SCSI WP=1).
Since FILEIO backend registration will no longer attempt to obtain exclusive access to an underlying struct block_device here, this flag is now obsolete.
Reported-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.3 |
|
#
28168905 |
| 15-Mar-2012 |
Jörn Engel <joern@logfs.org> |
target: remove obvious warnings
Get rid of a bunch of write-only variables. In a number of cases I suspect actual bugs to be present, so I left all of those for a second look.
(nab: fix lio-core p
target: remove obvious warnings
Get rid of a bunch of write-only variables. In a number of cases I suspect actual bugs to be present, so I left all of those for a second look.
(nab: fix lio-core patch fuzz)
Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
f2083241 |
| 15-Mar-2012 |
Jörn Engel <joern@logfs.org> |
target: Use array_zalloc for device_list
Turns an order-8 allocation into slab-sized ones, thereby preventing allocation failures with memory fragmentation.
This likely saves memory as well, as the
target: Use array_zalloc for device_list
Turns an order-8 allocation into slab-sized ones, thereby preventing allocation failures with memory fragmentation.
This likely saves memory as well, as the slab allocator can pack objects more tightly than the buddy allocator.
(nab: Fix lio-core patch fuzz)
Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
4a5a75f3 |
| 15-Mar-2012 |
Jörn Engel <joern@logfs.org> |
target: Use array_zalloc for tpg_lun_list
Turns an order-10 allocation into slab-sized ones, thereby preventing allocation failures with memory fragmentation.
This likely saves memory as well, as t
target: Use array_zalloc for tpg_lun_list
Turns an order-10 allocation into slab-sized ones, thereby preventing allocation failures with memory fragmentation.
This likely saves memory as well, as the slab allocator can pack objects more tightly than the buddy allocator.
Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.3-rc7, v3.3-rc6, v3.3-rc5, v3.3-rc4 |
|
#
99f730d8 |
| 16-Feb-2012 |
Jörn Engel <joern@logfs.org> |
target: Fix off-by-seven in target_report_luns
cdb_offset is always equal to offset - 8, so remove that one. More importantly, the existing code only worked correct if se_cmd->data_length is a mult
target: Fix off-by-seven in target_report_luns
cdb_offset is always equal to offset - 8, so remove that one. More importantly, the existing code only worked correct if se_cmd->data_length is a multiple of 8. Pass in a length of, say, 9 and we will happily overwrite 7 bytes of "unallocated" memory.
Now, afaics this bug is currently harmless, as allocations will implicitly be padded to multiples of 8 bytes. But depending on such a fact wouldn't qualify as sound engineering practice.
Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
47f1b880 |
| 15-Feb-2012 |
Jörn Engel <joern@logfs.org> |
target: prevent NULL pointer dereference in target_report_luns
transport_kmap_data_sg can return NULL. I never saw this trigger, but returning -ENOMEM seems better than a crash. Also removes a poi
target: prevent NULL pointer dereference in target_report_luns
transport_kmap_data_sg can return NULL. I never saw this trigger, but returning -ENOMEM seems better than a crash. Also removes a pointless case while at it.
Signed-off-by: Joern Engel <joern@logfs.org> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
382436f8 |
| 15-Feb-2012 |
Jörn Engel <joern@logfs.org> |
target: fix use after free in target_report_luns
Fix possible NULL pointer dereference in target_report_luns failure path.
Signed-off-by: Joern Engel <joern@logfs.org> Cc: stable@vger.kernel.org Si
target: fix use after free in target_report_luns
Fix possible NULL pointer dereference in target_report_luns failure path.
Signed-off-by: Joern Engel <joern@logfs.org> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
015487b8 |
| 13-Feb-2012 |
Roland Dreier <roland@purestorage.com> |
target: Untangle front-end and back-end meanings of max_sectors attribute
se_dev_attrib.max_sectors currently has two independent meanings:
- It is reported in the block limits VPD page as the max
target: Untangle front-end and back-end meanings of max_sectors attribute
se_dev_attrib.max_sectors currently has two independent meanings:
- It is reported in the block limits VPD page as the maximum transfer length, ie the largest IO that the front-end (fabric) can handle. Also the target core doesn't enforce this maximum transfer length.
- It is used to hold the size of the largest IO that the back-end can handle, so we know when to split SCSI commands into multiple tasks.
Fix this by adding a new se_dev_attrib.fabric_max_sectors to hold the maximum transfer length, and checking incoming IOs against that limit.
Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.3-rc3, v3.3-rc2, v3.3-rc1, v3.2, v3.2-rc7 |
|
#
3d26fea0 |
| 21-Dec-2011 |
Christoph Hellwig <hch@infradead.org> |
target: remove the transport_lun_active field in struct se_cmd
There is no reason to have a flag telling if a command is on the per-lun list, we can simply do a list_empty check before removing it a
target: remove the transport_lun_active field in struct se_cmd
There is no reason to have a flag telling if a command is on the per-lun list, we can simply do a list_empty check before removing it as long as we're careful to always use list_del_init.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
4949314c |
| 16-Jan-2012 |
Andy Grover <agrover@redhat.com> |
target: Allow control CDBs with data > 1 page
We need to handle >1 page control cdbs, so extend the code to do a vmap if bigger than 1 page. It seems like kmap() is still preferable if just a page,
target: Allow control CDBs with data > 1 page
We need to handle >1 page control cdbs, so extend the code to do a vmap if bigger than 1 page. It seems like kmap() is still preferable if just a page, fewer TLB shootdowns(?), so keep using that when possible.
Rename function pair for their new scope.
Signed-off-by: Andy Grover <agrover@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
8d9efe53 |
| 11-Jan-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
target: fix return code of core_tpg_.*_lun
- core_tpg_pre_addlun() returns always ERR_PTR() or the pointer, never NULL. The additional check for NULL in core_dev_add_lun() is not required.
- co
target: fix return code of core_tpg_.*_lun
- core_tpg_pre_addlun() returns always ERR_PTR() or the pointer, never NULL. The additional check for NULL in core_dev_add_lun() is not required.
- core_tpg_pre_dellun() returns always ERR_PTR() or the pointer, never NULL. The check for NULL in core_dev_del_lun() is wrong. The third argument (int *) is never used, remove it.
- core_dev_add_lun() returns always NULL or the pointer, never ERR_PTR. The check for IS_ERR() is not required.
(nab: Convert core_dev_add_lun() use err.h macros for failure handling to be consistent with the rest of target_core_fabric_configfs.c callers)
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
1dd0a067 |
| 10-Jan-2012 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
target: use save/restore lock primitive in core_dec_lacl_count()
It may happen that uasp will free the request in irq conntext, the callchain:
uasp_cmd_release() -> transport_generic_free_cmd() ->
target: use save/restore lock primitive in core_dec_lacl_count()
It may happen that uasp will free the request in irq conntext, the callchain:
uasp_cmd_release() -> transport_generic_free_cmd() -> core_dec_lacl_count()
where the last function enables the IRQ. Those irqs are re-disabled later (due to the spin.*irq_restore) but in between we could get hurt.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.2-rc6, v3.2-rc5, v3.2-rc4 |
|
#
65586d51 |
| 30-Nov-2011 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target: Drop se_device TCQ queue_depth usage from I/O path
Historically, pSCSI devices have been the ones that required target-core to enforce a per se_device->depth_left. This patch changes target
target: Drop se_device TCQ queue_depth usage from I/O path
Historically, pSCSI devices have been the ones that required target-core to enforce a per se_device->depth_left. This patch changes target-core to no longer (by default) enforce a per se_device->depth_left or sleep in transport_tcq_window_closed() when we out of queue slots for all backend export cases.
Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Cc: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.2-rc3 |
|
#
c4795fb2 |
| 16-Nov-2011 |
Christoph Hellwig <hch@infradead.org> |
target: header reshuffle, part2
This reorganized the headers under include/target into:
- target_core_base.h stays as is with all target-wide data stuctures and defines - target_core_backend.h co
target: header reshuffle, part2
This reorganized the headers under include/target into:
- target_core_base.h stays as is with all target-wide data stuctures and defines - target_core_backend.h contains the whole interface to I/O backends - target_core_fabric.h contains the whole interface to fabric modules
Except for those only the various configfs macro headers stay around.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.2-rc2 |
|
#
e26d99ae |
| 14-Nov-2011 |
Christoph Hellwig <hch@infradead.org> |
target: reshuffle headers
Create a new headers, drivers/target/target_core_internal.h that is supposed to hold all target_core-internal prototypes. Move all non-exported includes from include/targe
target: reshuffle headers
Create a new headers, drivers/target/target_core_internal.h that is supposed to hold all target_core-internal prototypes. Move all non-exported includes from include/target to it, and merge the smaller prototype-only includes inside drivers/target into it as well. Mark functions that were found to not be called outside their implementation file static.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
c638830d |
| 30-Nov-2011 |
Andy Grover <agrover@redhat.com> |
target: Don't return an error if disabling unsupported features
If an attribute is present (but not yet supported) it should be OK to write 0 (a no-op) to the attribute.
This is an issue because us
target: Don't return an error if disabling unsupported features
If an attribute is present (but not yet supported) it should be OK to write 0 (a no-op) to the attribute.
This is an issue because userspace should be able to save and restore all set attribute values without error.
Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
6f214755 |
| 29-Nov-2011 |
Christoph Hellwig <hch@infradead.org> |
target: remove the unused se_dev_list
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
|
#
58a2801a |
| 14-Nov-2011 |
Christoph Hellwig <hch@infradead.org> |
target: remove the se_obj_ptr and se_orig_obj_ptr se_cmd fields
We already have a perfectly valid se_device pointer in the command, so remove the mostly useless duplicates.
Signed-off-by: Christoph
target: remove the se_obj_ptr and se_orig_obj_ptr se_cmd fields
We already have a perfectly valid se_device pointer in the command, so remove the mostly useless duplicates.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.2-rc1 |
|
#
03e98c9e |
| 04-Nov-2011 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target: Address legacy PYX_TRANSPORT_* return code breakage
This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number of locations and addresses cases where transport_generic_reque
target: Address legacy PYX_TRANSPORT_* return code breakage
This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number of locations and addresses cases where transport_generic_request_failure() was returning the incorrect sense upon CHECK_CONDITION status after the v3.1 converson to use errno return codes.
This includes the conversion of transport_generic_request_failure() to process cmd->scsi_sense_reason and handle extra TCM_RESERVATION_CONFLICT before calling transport_send_check_condition_and_sense() to queue up response status. It also drops PYX_TRANSPORT_OUT_OF_MEMORY_RESOURCES legacy usgae, and returns TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE w/ a response for these cases.
transport_generic_allocate_tasks(), transport_generic_new_cmd(), backend SCF_SCSI_DATA_SG_IO_CDB ->do_task(), and emulated ->execute_task() have all been updated to set se_cmd->scsi_sense_reason and return errno codes universally upon failure. This includes cmd->scsi_sense_reason assignment in target_core_alua.c, target_core_pr.c and target_core_cdb.c emulation code.
Finally it updates fabric modules to remove the legacy usage, and for TFO->new_cmd_map() callers forwards return values outside of fabric code. iscsi-target has also been updated to remove a handful of special cases related to the cleanup and signaling QUEUE_FULL handling w/ ft_write_pending()
(v2: Drop extra SCF_SCSI_CDB_EXCEPTION check during failure from transport_generic_new_cmd, and re-add missing task->task_error_status assignment in transport_complete_task)
Cc: Christoph Hellwig <hch@lst.de> Cc: stable@kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
d29a5b6a |
| 03-Nov-2011 |
Christoph Hellwig <hch@infradead.org> |
target: remove SCF_EMULATE_CDB_ASYNC
All ->execute_task instances now need to complete the I/O explicitly, which can either happen synchronously or asynchronously.
Note that a lot of the CDB emulat
target: remove SCF_EMULATE_CDB_ASYNC
All ->execute_task instances now need to complete the I/O explicitly, which can either happen synchronously or asynchronously.
Note that a lot of the CDB emulations appear to return success even if some lowlevel operations failed. Given that this is an existing issue this patch doesn't change that fact.
(nab: Adding missing switch breaks in PR-IN + PR_OUT)
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|