raid0.h 951 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _RAID0_H
  3. #define _RAID0_H
  4. struct strip_zone {
  5. sector_t zone_end; /* Start of the next zone (in sectors) */
  6. sector_t dev_start; /* Zone offset in real dev (in sectors) */
  7. int nb_dev; /* # of devices attached to the zone */
  8. int disk_shift; /* start disk for the original layout */
  9. };
  10. /* Linux 3.14 (20d0189b101) made an unintended change to
  11. * the RAID0 layout for multi-zone arrays (where devices aren't all
  12. * the same size.
  13. * RAID0_ORIG_LAYOUT restores the original layout
  14. * RAID0_ALT_MULTIZONE_LAYOUT uses the altered layout
  15. * The layouts are identical when there is only one zone (all
  16. * devices the same size).
  17. */
  18. enum r0layout {
  19. RAID0_ORIG_LAYOUT = 1,
  20. RAID0_ALT_MULTIZONE_LAYOUT = 2,
  21. };
  22. struct r0conf {
  23. struct strip_zone *strip_zone;
  24. struct md_rdev **devlist; /* lists of rdevs, pointed to
  25. * by strip_zone->dev */
  26. int nr_strip_zones;
  27. enum r0layout layout;
  28. };
  29. #endif