[X][B][D][E][SRU][PATCH 0/1] Fix xfs fill_fs in fallocate06 from ubuntu_ltp_syscalls

Po-Hsu Lin po-hsu.lin at canonical.com
Mon Mar 9 11:18:07 UTC 2020


== SRU Justification ==
The fill_fs test for XFS in fallocate06 from ubuntu_ltp_syscalls will
fail on X/B/D/E:
  tst_test.c:1290: INFO: Testing on xfs
  tst_mkfs.c:90: INFO: Formatting /dev/loop1 with xfs opts='' extra opts=''
  tst_test.c:1229: INFO: Timeout per run is 0h 05m 00s
  fallocate06.c:117: INFO: Copy-on-write is not supported
  fallocate06.c:168: INFO: Case 1. Fill FS: no; Use copy on write: no
  fallocate06.c:157: PASS: write() successful
  fallocate06.c:201: PASS: Misaligned allocation works as expected
  fallocate06.c:157: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) successful
  fallocate06.c:237: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) cleared the correct file range
  fallocate06.c:168: INFO: Case 2. Fill FS: yes; Use copy on write: no
  tst_fill_fs.c:32: INFO: Creating file mntpoint/file0 size 21710183
  ...
  tst_fill_fs.c:32: INFO: Creating file mntpoint/file11 size 92198827
  tst_fill_fs.c:59: INFO: write(): ENOSPC (28)
  fallocate06.c:153: FAIL: Unexpected return value from write(): 7680 (expected 8192)
  fallocate06.c:157: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) successful
  fallocate06.c:237: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) cleared the correct file range

== Fix ==
* e093c4be (xfs: Fix tail rounding in xfs_alloc_file_space())

This patch can be cherry-picked in D/E and needs some minor context
adjustmest on X/B.

== Test ==
Test kernels can be found here:
https://people.canonical.com/~phlin/kernel/lp-1865967-xfs-fallocate06/

All patched kernels are working as expected, this issue will no longer
exist on XFS:
  tst_test.c:1290: INFO: Testing on xfs
  tst_mkfs.c:90: INFO: Formatting /dev/loop5 with xfs opts='' extra opts=''
  tst_test.c:1229: INFO: Timeout per run is 0h 05m 00s
  fallocate06.c:117: INFO: Copy-on-write is not supported
  fallocate06.c:168: INFO: Case 1. Fill FS: no; Use copy on write: no
  fallocate06.c:157: PASS: write() successful
  fallocate06.c:201: PASS: Misaligned allocation works as expected
  fallocate06.c:157: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) successful
  fallocate06.c:237: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) cleared the correct file range
  fallocate06.c:168: INFO: Case 2. Fill FS: yes; Use copy on write: no
  tst_fill_fs.c:32: INFO: Creating file mntpoint/file0 size 21710183
  ...
  tst_fill_fs.c:32: INFO: Creating file mntpoint/file11 size 92198827
  tst_fill_fs.c:59: INFO: write(): ENOSPC (28)
  fallocate06.c:157: PASS: write() successful
  fallocate06.c:201: PASS: Misaligned allocation works as expected
  fallocate06.c:157: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) successful
  fallocate06.c:237: PASS: fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) cleared the correct file range

== Regression Potential ==
Low, patch testable, this ensures all the blocks are properly
allocated and it's only affecting the allocation on XFS.


Max Reitz (1):
  xfs: Fix tail rounding in xfs_alloc_file_space()

 fs/xfs/xfs_bmap_util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.7.4



More information about the kernel-team mailing list