SuccessChanges

Summary

  1. linux: (partial) fix the discovery of hugepages on btrfs fsroot (details)
Commit 093316a897a2eb4972a7a3a5888f40975d03f6bf by brice.goglin
linux: (partial) fix the discovery of hugepages on btrfs fsroot

btrfs always returns 1 in directory stat.st_nlink.
It breaks make check in tests/linux/ because the hugepages discovery
uses st_nlink to allocate the memory page_types array.

Always allocate at least 3 page_types slots
(enough for all known cases, 1 for normal, 2 for huge pages)

(partially cherry-picked from commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc)

We don't reallocate later if needed as in 2.x commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc
because v1.11 doesn't deserve a complete fix. Just commit the minimal change
so that tests/linux/2i386-2t-hugepagesizecount with HWLOC_PAGESIZE_DEBUG=4096
doesn't crash in btrfs anymore (test-topology.sh fails during make check if /tmp is in btrfs).

Thanks to Philippe Swartvagher for the report.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
The file was modifiedsrc/topology-linux.c (diff)