target_core_iblock.h 873 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef TARGET_CORE_IBLOCK_H
  2. #define TARGET_CORE_IBLOCK_H
  3. #define IBLOCK_VERSION "4.0"
  4. #define IBLOCK_DEVICE_QUEUE_DEPTH 32
  5. #define IBLOCK_MAX_DEVICE_QUEUE_DEPTH 128
  6. #define IBLOCK_MAX_CDBS 16
  7. #define IBLOCK_LBA_SHIFT 9
  8. struct iblock_req {
  9. struct se_task ib_task;
  10. unsigned char ib_scsi_cdb[TCM_MAX_COMMAND_SIZE];
  11. atomic_t ib_bio_cnt;
  12. atomic_t ib_bio_err_cnt;
  13. struct bio *ib_bio;
  14. struct iblock_dev *ib_dev;
  15. } ____cacheline_aligned;
  16. #define IBDF_HAS_UDEV_PATH 0x01
  17. #define IBDF_HAS_FORCE 0x02
  18. struct iblock_dev {
  19. unsigned char ibd_udev_path[SE_UDEV_PATH_LEN];
  20. int ibd_force;
  21. int ibd_major;
  22. int ibd_minor;
  23. u32 ibd_depth;
  24. u32 ibd_flags;
  25. struct bio_set *ibd_bio_set;
  26. struct block_device *ibd_bd;
  27. struct iblock_hba *ibd_host;
  28. } ____cacheline_aligned;
  29. struct iblock_hba {
  30. int iblock_host_id;
  31. } ____cacheline_aligned;
  32. #endif /* TARGET_CORE_IBLOCK_H */