* [Cluster-devel] [PATCH] gfs2_grow: Disable rgrp alignment when dev topology is unsuitable
@ 2017-03-29 9:50 Andrew Price
0 siblings, 0 replies; only message in thread
From: Andrew Price @ 2017-03-29 9:50 UTC (permalink / raw)
To: cluster-devel.redhat.com
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@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;
}
--
2.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-29 9:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-29 9:50 [Cluster-devel] [PATCH] gfs2_grow: Disable rgrp alignment when dev topology is unsuitable Andrew Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).