Skip to content

Commit 44231e6

Browse files
author
Boaz Harrosh
committed
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>
1 parent dd29661 commit 44231e6

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎fs/exofs/ore.c‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,17 @@ int ore_verify_layout(unsigned total_comps, struct ore_layout *layout)
4949
{
5050
u64 stripe_length;
5151

52-
/* FIXME: Only raid0 is supported for now. */
53-
if (layout->raid_algorithm != PNFS_OSD_RAID_0) {
54-
ORE_ERR("Only RAID_0 for now\n");
52+
switch (layout->raid_algorithm) {
53+
case PNFS_OSD_RAID_0:
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");
5563
return -EINVAL;
5664
}
5765
if (0 != (layout->stripe_unit & ~PAGE_MASK)) {

0 commit comments

Comments
 (0)