target_core_file.h 965 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef TARGET_CORE_FILE_H
  2. #define TARGET_CORE_FILE_H
  3. #define FD_VERSION "4.0"
  4. #define FD_MAX_DEV_NAME 256
  5. #define FD_DEVICE_QUEUE_DEPTH 32
  6. #define FD_MAX_DEVICE_QUEUE_DEPTH 128
  7. #define FD_BLOCKSIZE 512
  8. #define FD_MAX_SECTORS 2048
  9. #define RRF_EMULATE_CDB 0x01
  10. #define RRF_GOT_LBA 0x02
  11. #define FBDF_HAS_PATH 0x01
  12. #define FBDF_HAS_SIZE 0x02
  13. #define FDBD_HAS_BUFFERED_IO_WCE 0x04
  14. struct fd_dev {
  15. struct se_device dev;
  16. u32 fbd_flags;
  17. unsigned char fd_dev_name[FD_MAX_DEV_NAME];
  18. /* Unique Ramdisk Device ID in Ramdisk HBA */
  19. u32 fd_dev_id;
  20. /* Number of SG tables in sg_table_array */
  21. u32 fd_table_count;
  22. u32 fd_queue_depth;
  23. u32 fd_block_size;
  24. unsigned long long fd_dev_size;
  25. struct file *fd_file;
  26. /* FILEIO HBA device is connected to */
  27. struct fd_host *fd_host;
  28. } ____cacheline_aligned;
  29. struct fd_host {
  30. u32 fd_host_dev_id_count;
  31. /* Unique FILEIO Host ID */
  32. u32 fd_host_id;
  33. } ____cacheline_aligned;
  34. #endif /* TARGET_CORE_FILE_H */