summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_iblock.h
Commit message (Collapse)AuthorAgeFilesLines
* target/iblock: Add parameter to specify read-only devicesAndy Grover2012-06-121-0/+1
| | | | | | | | | | see https://bugzilla.redhat.com/show_bug.cgi?id=818855 Adds a parameter so read-only block devices may be registered as LIO backstores. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: remove struct se_taskChristoph Hellwig2012-05-061-1/+0
| | | | | | | | | We can use struct se_cmd for everything it did. Make sure to pass the S/G list and data direction to the execution function to ease adding back BIDI support later on. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: increase iblock task sizesChristoph Hellwig2012-02-251-1/+1
| | | | | | | | | | | | | | | | There is no real limit for task sizes in the iblock driver given that we can chain bios. Increase the maximum size to UINT_MAX, and change the code to submit bios in a smaller batch size to avoid deadlocks when having more bios in flight than the pool supports. Also increase the pool size to always allow multiple tasks to be in flight. I also had to change the task refcounting to include one reference for the submission task, which is a standard practice in this kind of code in Linux (e.g. XFS I/O submission). This was wrong before, but couldn't be hit easily. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: remove the unused struct iblock_hbaChristoph Hellwig2012-02-251-5/+0
| | | | | | | | | | There is no reason to allocate a struct just to store the host number for a debug printk in the detach path. I've simply removed the verbose debugging given that the calling code thinks the number passed in is something different from a host ID anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: make the ->get_cdb method optionalChristoph Hellwig2011-10-241-1/+0
| | | | | | | | | The most commonly used file, iblock and rd backends have no use for a per-task CDB and thus don't need a method to copy it into their otherwise unused CDB fields. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: cleanup iblock bio submissionChristoph Hellwig2011-10-241-1/+0
| | | | | | | | | | | Move the entirely bio allocation, mapping and submission into ->do_task. This a) avoids blocking the I/O submission thread unessecarily, and b) simplifies the code greatly Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: Follow up core updates from AGrover and HCH (round 4)Andy Grover2011-07-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the squashed version of forth round series cleanups from Andy and Christoph following the post heavy lifting in the preceeding: 'Eliminate usage of struct se_mem' and 'Make all control CDBs scatter-gather' changes. This also includes a conversion of target core and the v3.0 mainline fabric modules (loopback and tcm_fc) to use pr_debug and the CONFIG_DYNAMIC_DEBUG infrastructure! These have been squashed into this third and final round for v3.1. target: Remove ifdeffed code in t_g_process_write target: Remove direct ramdisk code target: Rename task_sg_num to task_sg_nents target: Remove custom debug macros for pr_debug. Use pr_err(). target: Remove custom debug macros in mainline fabrics target: Set WSNZ=1 in block limits VPD. Abort if WRITE_SAME sectors = 0 target: Remove transport do_se_mem_map callback target: Further simplify transport_free_pages target: Redo task allocation return value handling target: Remove extra parentheses target: change alloc_task call to take *cdb, not *cmd (nab: Fix bogus struct file assignments in fd_do_readv and fd_do_writev) Signed-off-by: Andy Grover <agrover@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iblock: Remove unused iblock_dev membersRoland Dreier2011-07-221-5/+0
| | | | | | | | | | ibd_depth and ibd_force are used write-only. Remove them. ibd_major/minor can be easily retrieved from ibd_bd, so get rid of them too. Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target/iblock: Use request_queue->nr_request for se_device defaultsNicholas Bellinger2011-07-221-2/+0
| | | | | | | | | | | This patch converts iblock_create_virtdevice() to use request_queue->nr_request for se_dev_limits usage of ->hw_queue_depth and ->queue_depth for individual struct se_device export. It also removes the now unused defines for IBLOCK_DEVICE_QUEUE_DEPTH and IBLOCK_MAX_DEVICE_QUEUE_DEPTH Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* target: Core cleanups from AGrover (round 1)Andy Grover2011-07-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the squashed version of a number of cleanups and minor fixes from Andy's initial series (round 1) for target core this past spring. The condensed log looks like: target: use errno values instead of returning -1 for everything target: Rename transport_calc_sg_num to transport_init_task_sg target: Fix leak in error path in transport_init_task_sg target/pscsi: Remove pscsi_get_sh() usage target: Make two runtime checks into WARN_ONs target: Remove hba queue depth and convert to spin_lock_irq usage target: dev->dev_status_queue_obj is unused target: Make struct se_queue_req.cmd type struct se_cmd * target: Remove __transport_get_qr_from_queue() target: Rename se_dev->g_se_dev_list to se_dev_node target: Remove struct se_global target: Simplify scsi mib index table code target: Make dev_queue_obj a member of se_device instead of a pointer target: remove extraneous returns at end of void functions target: Ensure transport_dump_vpd_ident_type returns null-terminated str target: Function pointers don't need to use '&' to be assigned target: Fix comment in __transport_execute_tasks() target: Misc style cleanups target: rename struct pr_reservation_template to pr_reservation target: Remove #defines that just perform indirection target: Inline transport_get_task_from_execute_queue() target: Minor header comment fixes Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
* [SCSI] target: Add LIO target core v4.0.0-rc6Nicholas Bellinger2011-01-141-0/+40
LIO target is a full featured in-kernel target framework with the following feature set: High-performance, non-blocking, multithreaded architecture with SIMD support. Advanced SCSI feature set: * Persistent Reservations (PRs) * Asymmetric Logical Unit Assignment (ALUA) * Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S) * Full Error Recovery (ERL=0,1,2) * Active/active task migration and session continuation (ERL=2) * Thin LUN provisioning (UNMAP and WRITE_SAMExx) Multiprotocol target plugins Storage media independence: * Virtualization of all storage media; transparent mapping of IO to LUNs * No hard limits on number of LUNs per Target; maximum LUN size ~750 TB * Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc. Standards compliance: * Full compliance with IETF (RFC 3720) * Full implementation of SPC-4 PRs and ALUA Significant code cleanups done by Christoph Hellwig. [jejb: fix up for new block bdev exclusive interface. Minor fixes from Randy Dunlap and Dan Carpenter.] Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>