This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit c2c2ff8d68176a55bd52b46cac01c1b84453f35d
Author: Andrew Price <anprice(a)redhat.com>
Date: Tue Mar 28 21:32:42 2017 +0100
gfs2_grow: Disable rgrp alignment when dev topology is unsuitable
If optimal_io_size is not a multiple of minimum_io_size then the values
are not reliable swidth and sunit values, so disable rgrp stripe
alignment in that case.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/mkfs/main_grow.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 173466c..66ba057 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -169,8 +169,12 @@ static lgfs2_rgrps_t rgrps_init(struct gfs2_sbd *sdp)
unsigned long min_io_sz = blkid_topology_get_minimum_io_size(tp);
unsigned long opt_io_sz = blkid_topology_get_optimal_io_size(tp);
unsigned long phy_sector_sz = blkid_topology_get_physical_sector_size(tp);
+ /* If optimal_io_size is not a multiple of minimum_io_size then
+ the values are not reliable swidth and sunit values, so don't
+ attempt rgrp alignment */
if ((min_io_sz > phy_sector_sz) &&
- (opt_io_sz > phy_sector_sz)) {
+ (opt_io_sz > phy_sector_sz) &&
+ (opt_io_sz % min_io_sz == 0)) {
al_base = opt_io_sz / sdp->bsize;
al_off = min_io_sz / sdp->bsize;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date