multipath.h 884 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _MULTIPATH_H
  2. #define _MULTIPATH_H
  3. struct multipath_info {
  4. mdk_rdev_t *rdev;
  5. };
  6. struct multipath_private_data {
  7. mddev_t *mddev;
  8. struct multipath_info *multipaths;
  9. int raid_disks;
  10. int working_disks;
  11. spinlock_t device_lock;
  12. struct list_head retry_list;
  13. mempool_t *pool;
  14. };
  15. typedef struct multipath_private_data multipath_conf_t;
  16. /*
  17. * this is the only point in the RAID code where we violate
  18. * C type safety. mddev->private is an 'opaque' pointer.
  19. */
  20. #define mddev_to_conf(mddev) ((multipath_conf_t *) mddev->private)
  21. /*
  22. * this is our 'private' 'collective' MULTIPATH buffer head.
  23. * it contains information about what kind of IO operations were started
  24. * for this MULTIPATH operation, and about their status:
  25. */
  26. struct multipath_bh {
  27. mddev_t *mddev;
  28. struct bio *master_bio;
  29. struct bio bio;
  30. int path;
  31. struct list_head retry_list;
  32. };
  33. #endif