multipath.h 912 B

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