pnfs.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2008, 2009
  3. * Boaz Harrosh <bharrosh@panasas.com>
  4. *
  5. * This file is part of exofs.
  6. *
  7. * exofs is free software; you can redistribute it and/or modify it under the
  8. * terms of the GNU General Public License version 2 as published by the Free
  9. * Software Foundation.
  10. *
  11. */
  12. /* FIXME: Remove this file once pnfs hits mainline */
  13. #ifndef __EXOFS_PNFS_H__
  14. #define __EXOFS_PNFS_H__
  15. #if defined(CONFIG_PNFS)
  16. /* FIXME: move this file to: linux/exportfs/pnfs_osd_xdr.h */
  17. #include "../nfs/objlayout/pnfs_osd_xdr.h"
  18. #else /* defined(CONFIG_PNFS) */
  19. enum pnfs_iomode {
  20. IOMODE_READ = 1,
  21. IOMODE_RW = 2,
  22. IOMODE_ANY = 3,
  23. };
  24. /* Layout Structure */
  25. enum pnfs_osd_raid_algorithm4 {
  26. PNFS_OSD_RAID_0 = 1,
  27. PNFS_OSD_RAID_4 = 2,
  28. PNFS_OSD_RAID_5 = 3,
  29. PNFS_OSD_RAID_PQ = 4 /* Reed-Solomon P+Q */
  30. };
  31. struct pnfs_osd_data_map {
  32. u32 odm_num_comps;
  33. u64 odm_stripe_unit;
  34. u32 odm_group_width;
  35. u32 odm_group_depth;
  36. u32 odm_mirror_cnt;
  37. u32 odm_raid_algorithm;
  38. };
  39. #endif /* else defined(CONFIG_PNFS) */
  40. #endif /* __EXOFS_PNFS_H__ */