diff options
Diffstat (limited to 'fs/exofs/ore.c')
-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)) { |