Commit 44231e68 authored by Boaz Harrosh's avatar Boaz Harrosh

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: default avatarBoaz Harrosh <bharrosh@panasas.com>
parent dd296619
...@@ -49,9 +49,17 @@ int ore_verify_layout(unsigned total_comps, struct ore_layout *layout) ...@@ -49,9 +49,17 @@ int ore_verify_layout(unsigned total_comps, struct ore_layout *layout)
{ {
u64 stripe_length; u64 stripe_length;
/* FIXME: Only raid0 is supported for now. */ switch (layout->raid_algorithm) {
if (layout->raid_algorithm != PNFS_OSD_RAID_0) { case PNFS_OSD_RAID_0:
ORE_ERR("Only RAID_0 for now\n"); layout->parity = 0;
break;
case PNFS_OSD_RAID_5:
layout->parity = 1;
break;
case PNFS_OSD_RAID_PQ:
case PNFS_OSD_RAID_4:
default:
ORE_ERR("Only RAID_0/5 for now\n");
return -EINVAL; return -EINVAL;
} }
if (0 != (layout->stripe_unit & ~PAGE_MASK)) { if (0 != (layout->stripe_unit & ~PAGE_MASK)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment