]> git.ipfire.org Git - thirdparty/mdadm.git/commit - util.c
mdadm: force a uuid swap on big endian
authorNigel Croxon <ncroxon@redhat.com>
Tue, 24 Sep 2019 15:39:24 +0000 (11:39 -0400)
committerJes Sorensen <jsorensen@fb.com>
Mon, 30 Sep 2019 19:14:44 +0000 (15:14 -0400)
commit2c2d9c48d2daf0d78d20494c3779c0f6dc4bfa75
tree75a2f4bf5da8daa8391b58bd8fc70f4cbab5779b
parent43ebc9105e9dafe5145b3e801c05da4736bf6e02
mdadm: force a uuid swap on big endian

The code path for metadata 0.90 calls a common routine
fname_from_uuid that uses metadata 1.2. The code expects member
swapuuid to be setup and usable. But it is only setup when using
metadata 1.2. Since the metadata 0.90 did not create swapuuid
and set it. The test (st->ss == &super1) ? 1 : st->ss->swapuuid
fails. The swapuuid is set at compile time based on byte order.
Any call based on metadata 0.90 and on big endian processors,
the --export uuid will be incorrect.

Signed-Off-by: Nigel Croxon <ncroxon@redhat.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
util.c