]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: Fix uninitialized cfg->lsunit
authorAllison Collins <allison.henderson@oracle.com>
Wed, 10 Jul 2019 15:38:04 +0000 (11:38 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 10 Jul 2019 15:38:04 +0000 (11:38 -0400)
commit59cf967983f6aaff4ce33a50135ae57032ebd8f2
tree42471c2617f8ca84e81648b801e495590a24aa46
parent328148f324e3ade603f4676c2afed8c6d7855873
xfsprogs: Fix uninitialized cfg->lsunit

While investigating another mkfs bug, noticed that cfg->lsunit is sometimes
left uninitialized when it should not.  This is because calc_stripe_factors
in some cases needs cfg->loginternal to be set first.  This is done in
validate_logdev. So move calc_stripe_factors below validate_logdev while
parsing configs.

Signed-off-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
mkfs/xfs_mkfs.c