xfstest sanity checks on seek operations fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
Fix Released
|
High
|
Canonical Kernel Team | ||
linux (Ubuntu) |
Fix Released
|
High
|
Joseph Salisbury | ||
Zesty |
Fix Released
|
High
|
Joseph Salisbury | ||
Artful |
Fix Released
|
High
|
Joseph Salisbury |
Bug Description
== Comment: #0 - Harish Sriram
Issue:
-------
xfstest fails with sanity checks on seek operations
# uname -a
Linux ltc-tuleta12 4.10.0-21-generic #23~16.04.1-Ubuntu SMP Tue May 2 12:54:57 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux
Steps to reproduce:
-------
1. Create a loop device with xfs filesystem
2. git clone git://git.
3. make
4. Create a local.config for running with created loop device
5. Run xfstests-dev test : ./check tests/generic/285 or ./check tests/generic/436
The test 285 fails with following
...
...
07. Test file with unwritten extents, only have dirty pages
07.01 SEEK_HOLE expected 0 or 45056, got 0. succ
07.02 SEEK_HOLE expected 1 or 45056, got 1. succ
07.03 SEEK_DATA expected 40960 or 40960, got -1. FAIL
07.04 SEEK_DATA expected 40960 or 40960, got -1. FAIL
08. Test file with unwritten extents, only have unwritten pages
08.01 SEEK_HOLE expected 0 or 45056, got 0. succ
08.02 SEEK_HOLE expected 1 or 45056, got 1. succ
08.03 SEEK_DATA expected 40960 or 40960, got -1. FAIL
08.04 SEEK_DATA expected 40960 or 40960, got -1. FAIL
The test 436 fails with
...
...
14. Test file with unwritten extents, small hole after pagevec dirty pages
14.01 SEEK_HOLE expected 917504 or 4194304, got 3670016. FAIL
14.02 SEEK_HOLE expected 917504 or 4194304, got 3670016. FAIL
14.03 SEEK_HOLE expected 3670016 or 4194304, got 3670016. succ
14.04 SEEK_DATA expected 0 or 0, got 0. succ
14.05 SEEK_DATA expected 1 or 1, got 1. succ
14.06 SEEK_DATA expected 2752512 or 2752512, got 2752512. succ
seek sanity check failed!
Full log is attached.
== Comment: #6 - Harish Sriram
commit 5375023ae126655
Author: Jan Kara <email address hidden>
Date: Thu May 18 16:36:22 2017 -0700
xfs: Fix missed holes in SEEK_HOLE implementation
XFS SEEK_HOLE implementation could miss a hole in an unwritten extent as
can be seen by the following command:
xfs_io -c "falloc 0 256k" -c "pwrite 0 56k" -c "pwrite 128k 8k"
-c "seek -h 0" file
wrote 57344/57344 bytes at offset 0
56 KiB, 14 ops; 0.0000 sec (49.312 MiB/sec and 12623.9856 ops/sec)
wrote 8192/8192 bytes at offset 131072
8 KiB, 2 ops; 0.0000 sec (70.383 MiB/sec and 18018.0180 ops/sec)
Whence Result
HOLE 139264
Where we can see that hole at offset 56k was just ignored by SEEK_HOLE
implementation. The bug is in xfs_find_
not properly detect the case when pages are not contiguous.
Fix the problem by properly detecting when found page has larger offset
than expected.
CC: <email address hidden>
Fixes: d126d43f631f996
Signed-off-by: Jan Kara <email address hidden>
Reviewed-by: Brian Foster <email address hidden>
Reviewed-by: Darrick J. Wong <email address hidden>
Signed-off-by: Darrick J. Wong <email address hidden>
The above commit fixes the generic/436 test, but generic/285 still FAILS.
The generic/285 failure is reproducible on most P8/P9 systems.
CVE References
Changed in xfstt (Ubuntu): | |
importance: | Undecided → High |
Changed in ubuntu-power-systems: | |
importance: | Undecided → High |
Changed in ubuntu-power-systems: | |
assignee: | nobody → Canonical Kernel Team (canonical-kernel-team) |
affects: | xfstt (Ubuntu) → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
assignee: | Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Kernel Team (canonical-kernel-team) |
tags: | added: triage-a |
Changed in ubuntu-power-systems: | |
status: | New → In Progress |
tags: |
added: triage-g removed: triage-a |
Changed in linux (Ubuntu Zesty): | |
status: | In Progress → Fix Committed |
Changed in ubuntu-power-systems: | |
status: | In Progress → Fix Committed |
tags: |
added: verification-done-zesty removed: verification-needed-zesty |
Changed in ubuntu-power-systems: | |
status: | Fix Committed → Fix Released |
tags: |
added: targetmilestone-inin16044 removed: targetmilestone-inin16043 |
tags: |
added: targetmilestone-inin1804 removed: targetmilestone-inin16044 |
tags: | added: cscc |
Default Comment by Bridge