]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/643: fix weird problems on 64k-page arm systems
authorDarrick J. Wong <djwong@kernel.org>
Wed, 1 Sep 2021 00:11:21 +0000 (17:11 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 5 Sep 2021 13:18:06 +0000 (21:18 +0800)
commita468c7ebc3c04b071e6f59686c41e3a56cbee26d
treeb95b8aaf4ad9c4949c4c0392b6a59802b0a878c4
parent591c8fb57d07dcd3cf5784adf1c7d06040829ef1
generic/643: fix weird problems on 64k-page arm systems

I noticed the following regression on an arm64 system with 64k pages:

  --- generic/643.out
  +++ generic/643.out.bad
  @@ -1,2 +1,3 @@
   QA output created by 643
  +swapon added 960 pages, expected 896
   Silence is golden

Evidently mkswap writes the swapfile header advertising one memory page
less than the size of the file, and on some architectures the kernel
can sometimes grab one page less than what's advertised.  This variance
is weird but tolerable; we simply don't want to see the page count
doubling when the file size doubles.

While we're at it, include the commit id of the fix in the commit
message.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/643
tests/generic/643.out