diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2010-11-21 13:03:24 -0500 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2011-10-24 20:22:29 -0400 |
commit | 44231e686b2ba3b5702db867bb84e6d76b7cf2c7 (patch) | |
tree | ba99b8cf458a8c24264bfe3826d44610861a283a /fs/exofs | |
parent | dd296619974c50c46c67e58f355a7e85ef3f0c01 (diff) |
ore: Enable RAID5 mounts
Now that we support raid5 Enable it at mount. Raid6 will come next
raid4 is not demanded for so it will probably not be enabled.
(Until some one wants it)
NOTE: That mkfs.exofs had support for raid5/6 since long time
ago. (Making an empty raidX FS is just as easy as raid0 ;-} )
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r-- | fs/exofs/ore.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c index 08ee454b2187..fcfa86ae6faf 100644 --- a/fs/exofs/ore.c +++ b/fs/exofs/ore.c | |||
@@ -49,9 +49,17 @@ int ore_verify_layout(unsigned total_comps, struct ore_layout *layout) | |||
49 | { | 49 | { |
50 | u64 stripe_length; | 50 | u64 stripe_length; |
51 | 51 | ||
52 | /* FIXME: Only raid0 is supported for now. */ | 52 | switch (layout->raid_algorithm) { |
53 | if (layout->raid_algorithm != PNFS_OSD_RAID_0) { | 53 | case PNFS_OSD_RAID_0: |
54 | ORE_ERR("Only RAID_0 for now\n"); | 54 | layout->parity = 0; |
55 | break; | ||
56 | case PNFS_OSD_RAID_5: | ||
57 | layout->parity = 1; | ||
58 | break; | ||
59 | case PNFS_OSD_RAID_PQ: | ||
60 | case PNFS_OSD_RAID_4: | ||
61 | default: | ||
62 | ORE_ERR("Only RAID_0/5 for now\n"); | ||
55 | return -EINVAL; | 63 | return -EINVAL; |
56 | } | 64 | } |
57 | if (0 != (layout->stripe_unit & ~PAGE_MASK)) { | 65 | if (0 != (layout->stripe_unit & ~PAGE_MASK)) { |