e3d6f909ed
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>
40 lines
873 B
C
40 lines
873 B
C
#ifndef TARGET_CORE_IBLOCK_H
|
|
#define TARGET_CORE_IBLOCK_H
|
|
|
|
#define IBLOCK_VERSION "4.0"
|
|
|
|
#define IBLOCK_DEVICE_QUEUE_DEPTH 32
|
|
#define IBLOCK_MAX_DEVICE_QUEUE_DEPTH 128
|
|
#define IBLOCK_MAX_CDBS 16
|
|
#define IBLOCK_LBA_SHIFT 9
|
|
|
|
struct iblock_req {
|
|
struct se_task ib_task;
|
|
unsigned char ib_scsi_cdb[TCM_MAX_COMMAND_SIZE];
|
|
atomic_t ib_bio_cnt;
|
|
atomic_t ib_bio_err_cnt;
|
|
struct bio *ib_bio;
|
|
struct iblock_dev *ib_dev;
|
|
} ____cacheline_aligned;
|
|
|
|
#define IBDF_HAS_UDEV_PATH 0x01
|
|
#define IBDF_HAS_FORCE 0x02
|
|
|
|
struct iblock_dev {
|
|
unsigned char ibd_udev_path[SE_UDEV_PATH_LEN];
|
|
int ibd_force;
|
|
int ibd_major;
|
|
int ibd_minor;
|
|
u32 ibd_depth;
|
|
u32 ibd_flags;
|
|
struct bio_set *ibd_bio_set;
|
|
struct block_device *ibd_bd;
|
|
struct iblock_hba *ibd_host;
|
|
} ____cacheline_aligned;
|
|
|
|
struct iblock_hba {
|
|
int iblock_host_id;
|
|
} ____cacheline_aligned;
|
|
|
|
#endif /* TARGET_CORE_IBLOCK_H */
|