[PATCH] SQUASHME: pnfsd-exofs: Fix the RAID5 export

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BAD RAID Math in layout_get.

TODO: ore_calc_stripe_info, which is already called, as all
the needed information calculated by _align_io. Only that
first_stripe_start is only set in case of RAID, but lo_get
always needs it. Move the set of first_stripe_start inside
ore_calc_stripe_info, to the generic part.

Signed-off-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>
---
 fs/exofs/export.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/exofs/export.c b/fs/exofs/export.c
index 8a0e510..621bd11 100644
--- a/fs/exofs/export.c
+++ b/fs/exofs/export.c
@@ -96,7 +96,8 @@ void ore_layout_2_pnfs_layout(struct pnfs_osd_layout *pl,
 
 static void _align_io(struct ore_layout *layout, u64 *offset, u64 *length)
 {
-	u64 stripe_size = layout->group_width * layout->stripe_unit;
+	u64 stripe_size = (layout->group_width - layout->parity) *
+							layout->stripe_unit;
 	u64 group_size = stripe_size * layout->group_depth;
 
 	*offset = div64_u64(*offset, group_size) * group_size;
-- 
1.7.2.3


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux