Skip to contentSkip to conversation

generic: test i_blocks for large files

PATCH Superseded Pavel Reichl 3 participants 9 messages Aug 12, 2022 – Aug 19, 2022

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic: test i_blocks for large files

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
 tests/generic/693-inodes-for-large-files     | 49 ++++++++++++++++++++
 tests/generic/693-inodes-for-large-files.out |  1 +
 2 files changed, 50 insertions(+)
 create mode 100755 tests/generic/693-inodes-for-large-files
 create mode 100644 tests/generic/693-inodes-for-large-files.out
tests/generic/693-inodes-for-large-files new file +49 -0
new file mode 100755
index 00000000..797d6a21
@@ -0,0 +1,49 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto
+
+# Override the default cleanup function.
+_cleanup()
+{
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "truncate 4G" $junk_file
+
+iblocks=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`
+test -z "$iblocks" && echo 'Failed to parse the blocks'
+
+_test_cycle_mount
+
+iblocks_after_remount=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`
+
+test -z "$iblocks_after_remount" && echo 'Failed to parse the blocks'
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+	status=1
+	exit
+fi
+
+status=0
+
+exit
tests/generic/693-inodes-for-large-files.out new file +1 -0
new file mode 100644
index 00000000..f39aa77c
@@ -0,0 +1 @@
+QA output created by 693-inodes-for-large-files
Signature · 1 line
2.37.1
#1 lore raw

tests/generic/693-inodes-for-large-files

Quoted 13 lines · Pavel Reichl

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
 tests/generic/693-inodes-for-large-files     | 49 ++++++++++++++++++++
 tests/generic/693-inodes-for-large-files.out |  1 +
 2 files changed, 50 insertions(+)
 create mode 100755 tests/generic/693-inodes-for-large-files
 create mode 100644 tests/generic/693-inodes-for-large-files.out
tests/generic/693-inodes-for-large-files +0 -0

I think case *number* is enough.

Quoted 19 lines

new file mode 100755
index 00000000..797d6a21

tests/generic/693-inodes-for-large-files new file +14 -0
@@ -0,0 +1,49 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto

tests/generic/693-inodes-for-large-files line 24

Quoted 10 lines
tests/generic/693-inodes-for-large-files new file +10 -0
+
+# Override the default cleanup function.
+_cleanup()
+{
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test

If this test need 4G free space, I'm wondering if we need to make sure there's enough space in $TEST_DIR, as we do in _require_scratch_size.

tests/generic/693-inodes-for-large-files line 30

Quoted 6 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "truncate 4G" $junk_file

It helps to allocate 4g real space on exfat, due to exfat doesn't support sparse file, but on other filesystems (e.g. xfs, ext4, btrfs) it will get a file which i_blocks=0.

As a generic test case, if you really want to allocate 4g real space, I think you have to real write data:

$XFS_IO_PROG -f -c "pwrite -W 0 4g" $junk_file

If anyone knows any better idea, feel free to reply :)

tests/generic/693-inodes-for-large-files line 32

Quoted 2 lines
tests/generic/693-inodes-for-large-files new file +2 -0
+
+iblocks=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`

stat -c %b $junk_file ??

tests/generic/693-inodes-for-large-files line 37

Quoted 5 lines
tests/generic/693-inodes-for-large-files new file +5 -0
+test -z "$iblocks" && echo 'Failed to parse the blocks'
+
+_test_cycle_mount
+
+iblocks_after_remount=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`

stat -c %b $junk_file ??

tests/generic/693-inodes-for-large-files line 39

Quoted 2 lines
tests/generic/693-inodes-for-large-files new file +2 -0
+
+test -z "$iblocks_after_remount" && echo 'Failed to parse the blocks'

When will we get an empty "$iblocks_after_remount" ?

tests/generic/693-inodes-for-large-files line 43

Quoted 4 lines
tests/generic/693-inodes-for-large-files new file +4 -0
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+	status=1

If you "exit" directly, the status is 1 by default. But I think you don't need to exit at here, due to above output will break golden image and fail this test.

tests/generic/693-inodes-for-large-files.out line 1

Quoted 13 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+	exit
+fi
+
+status=0
+
+exit
tests/generic/693-inodes-for-large-files.out new file +1 -0
new file mode 100644
index 00000000..f39aa77c
@@ -0,0 +1 @@
+QA output created by 693-inodes-for-large-files

Silence is golden ??

Quoted 3 lines
Signature · 1 line
2.37.1
#2 lore raw
Quoted 13 lines · Zorro Lang
Quoted 12 lines · Pavel Reichl

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
  tests/generic/693-inodes-for-large-files     | 49 ++++++++++++++++++++
  tests/generic/693-inodes-for-large-files.out |  1 +
  2 files changed, 50 insertions(+)

create mode 100755 tests/generic/693-inodes-for-large-files create mode 100644 tests/generic/693-inodes-for-large-files.out

Quoted 2 lines

tests/generic/693-inodes-for-large-files

Quoted 1 line
tests/generic/693-inodes-for-large-files +0 -0

I think case *number* is enough.

0K, the 'new' script asked, so I provided:-)

Quoted 24 lines
Quoted 24 lines

new file mode 100755
index 00000000..797d6a21

tests/generic/693-inodes-for-large-files new file +18 -0
@@ -0,0 +1,49 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto
+
+# Override the default cleanup function.
+_cleanup()
+{
Quoted 8 lines

tests/generic/693-inodes-for-large-files line 24

Quoted 6 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test

If this test need 4G free space, I'm wondering if we need to make sure there's enough space in $TEST_DIR, as we do in _require_scratch_size.

OK, I'll look into it.

Quoted 10 lines

tests/generic/693-inodes-for-large-files line 30

Quoted 7 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "truncate 4G" $junk_file

It helps to allocate 4g real space on exfat, due to exfat doesn't support sparse file, but on other filesystems (e.g. xfs, ext4, btrfs) it will get a file which i_blocks=0.

OK, I know that and I think it's fine - I just need a test for consistency after remounting.

Quoted 19 lines

As a generic test case, if you really want to allocate 4g real space, I think you have to real write data:

   $XFS_IO_PROG -f -c "pwrite -W 0 4g" $junk_file

If anyone knows any better idea, feel free to reply :)

tests/generic/693-inodes-for-large-files line 32

Quoted 2 lines
tests/generic/693-inodes-for-large-files new file +2 -0
+
+iblocks=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`

stat -c %b $junk_file ??

tests/generic/693-inodes-for-large-files line 37

Quoted 5 lines
tests/generic/693-inodes-for-large-files new file +5 -0
+test -z "$iblocks" && echo 'Failed to parse the blocks'
+
+_test_cycle_mount
+
+iblocks_after_remount=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`

stat -c %b $junk_file ??

Quoted 3 lines

tests/generic/693-inodes-for-large-files line 39

Quoted 2 lines
tests/generic/693-inodes-for-large-files new file +2 -0
+
+test -z "$iblocks_after_remount" && echo 'Failed to parse the blocks'

When will we get an empty "$iblocks_after_remount" ?

It is just a check that both xfs_io and grep worked as expected.

Quoted 7 lines

tests/generic/693-inodes-for-large-files line 43

Quoted 5 lines
tests/generic/693-inodes-for-large-files new file +4 -0
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+	status=1

If you "exit" directly, the status is 1 by default. But I think you don't need to exit at here, due to above output will break golden image and fail this test.

OK, I'll fix that. Thanks!

Quoted 15 lines
Quoted 13 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+	exit
+fi
+
+status=0
+
+exit
tests/generic/693-inodes-for-large-files.out new file +0 -0
new file mode 100644
index 00000000..f39aa77c

tests/generic/693-inodes-for-large-files.out line 1

Quoted 1 line
tests/generic/693-inodes-for-large-files.out new file +1 -0
@@ -0,0 +1 @@
+QA output created by 693-inodes-for-large-files

Silence is golden ??

Well I don't echo that in the script, but if that's custom I'll do it.

Thanks for the comments!

Quoted 4 lines
Quoted 4 lines
Signature · 2 lines
-- 
2.37.1
#3 lore raw
Quoted 61 lines · Pavel Reichl
Quoted 13 lines · Zorro Lang
Quoted 12 lines · Pavel Reichl

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
  tests/generic/693-inodes-for-large-files     | 49 ++++++++++++++++++++
  tests/generic/693-inodes-for-large-files.out |  1 +
  2 files changed, 50 insertions(+)

create mode 100755 tests/generic/693-inodes-for-large-files create mode 100644 tests/generic/693-inodes-for-large-files.out

Quoted 2 lines

tests/generic/693-inodes-for-large-files

Quoted 1 line
tests/generic/693-inodes-for-large-files +0 -0

I think case *number* is enough.

0K, the 'new' script asked, so I provided:-)

Quoted 24 lines
Quoted 24 lines

new file mode 100755
index 00000000..797d6a21

tests/generic/693-inodes-for-large-files new file +18 -0
@@ -0,0 +1,49 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto
+
+# Override the default cleanup function.
+_cleanup()
+{
Quoted 8 lines

tests/generic/693-inodes-for-large-files line 24

Quoted 6 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test

If this test need 4G free space, I'm wondering if we need to make sure there's enough space in $TEST_DIR, as we do in _require_scratch_size.

OK, I'll look into it.

Quoted 10 lines

tests/generic/693-inodes-for-large-files line 30

Quoted 7 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "truncate 4G" $junk_file

It helps to allocate 4g real space on exfat, due to exfat doesn't support sparse file, but on other filesystems (e.g. xfs, ext4, btrfs) it will get a file which i_blocks=0.

Quoted 2 lines

OK, I know that and I think it's fine - I just need a test for consistency after remounting.

So you don't need to allocate 4g real space? If so, that helps the test faster, but that depends on what are you really trying to test. I just saw you try to get 4g i_blocks, so thought you might need 4g real space.

Thanks,
Zorro

Quoted 57 lines
Quoted 19 lines

As a generic test case, if you really want to allocate 4g real space, I think you have to real write data:

   $XFS_IO_PROG -f -c "pwrite -W 0 4g" $junk_file

If anyone knows any better idea, feel free to reply :)

tests/generic/693-inodes-for-large-files line 32

Quoted 2 lines
tests/generic/693-inodes-for-large-files new file +2 -0
+
+iblocks=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`

stat -c %b $junk_file ??

tests/generic/693-inodes-for-large-files line 37

Quoted 5 lines
tests/generic/693-inodes-for-large-files new file +5 -0
+test -z "$iblocks" && echo 'Failed to parse the blocks'
+
+_test_cycle_mount
+
+iblocks_after_remount=`$XFS_IO_PROG -c "stat" $junk_file | grep 'stat.blocks'`

stat -c %b $junk_file ??

Quoted 3 lines

tests/generic/693-inodes-for-large-files line 39

Quoted 2 lines
tests/generic/693-inodes-for-large-files new file +2 -0
+
+test -z "$iblocks_after_remount" && echo 'Failed to parse the blocks'

When will we get an empty "$iblocks_after_remount" ?

It is just a check that both xfs_io and grep worked as expected.

Quoted 7 lines

tests/generic/693-inodes-for-large-files line 43

Quoted 5 lines
tests/generic/693-inodes-for-large-files new file +4 -0
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+	status=1

If you "exit" directly, the status is 1 by default. But I think you don't need to exit at here, due to above output will break golden image and fail this test.

OK, I'll fix that. Thanks!

Quoted 15 lines
Quoted 13 lines
tests/generic/693-inodes-for-large-files new file +6 -0
+	exit
+fi
+
+status=0
+
+exit
tests/generic/693-inodes-for-large-files.out new file +0 -0
new file mode 100644
index 00000000..f39aa77c

tests/generic/693-inodes-for-large-files.out line 1

Quoted 1 line
tests/generic/693-inodes-for-large-files.out new file +1 -0
@@ -0,0 +1 @@
+QA output created by 693-inodes-for-large-files

Silence is golden ??

Well I don't echo that in the script, but if that's custom I'll do it.

Thanks for the comments!

Quoted 4 lines
Quoted 4 lines
Signature · 2 lines
-- 
2.37.1
#4 lore raw

PATCH v2 1/1 generic: test i_blocks for large files

In reply to Zorro Lang

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
 common/rc             | 10 ++++++++++
 tests/generic/693     | 46 +++++++++++++++++++++++++++++++++++++++++++
 tests/generic/693.out |  2 ++
 3 files changed, 58 insertions(+)
 create mode 100755 tests/generic/693
 create mode 100644 tests/generic/693.out
common/rc +10 -0
index 197c9415..06cbdee5 100644
@@ -1980,6 +1980,16 @@ _require_test()
     touch ${RESULT_DIR}/require_test
 }
 
+# require a test dev of a minimum size (in kb)
+_require_test_size()
+{
+	[ $# -eq 1 ] || _fail "_require_test_size: expected size param"
+
+	_require_test
+	local devsize=`_get_device_size $TEST_DEV`
+	[ $devsize -lt $1 ] && _notrun "test dev too small"
+}
+
 _has_logdev()
 {
 	local ret=0
tests/generic/693 new file +46 -0

46 lines not on this page · raw message

tests/generic/693.out new file +2 -0
new file mode 100644
index 00000000..01884ea5
@@ -0,0 +1,2 @@
+QA output created by 693
+Silence is golden
Signature · 1 line
2.37.2
#5 lore raw
Quoted 54 lines · Pavel Reichl

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
 common/rc             | 10 ++++++++++
 tests/generic/693     | 46 +++++++++++++++++++++++++++++++++++++++++++
 tests/generic/693.out |  2 ++
 3 files changed, 58 insertions(+)
 create mode 100755 tests/generic/693
 create mode 100644 tests/generic/693.out
common/rc +10 -0
index 197c9415..06cbdee5 100644
@@ -1980,6 +1980,16 @@ _require_test()
     touch ${RESULT_DIR}/require_test
 }
 
+# require a test dev of a minimum size (in kb)
+_require_test_size()
+{
+	[ $# -eq 1 ] || _fail "_require_test_size: expected size param"
+
+	_require_test
+	local devsize=`_get_device_size $TEST_DEV`
+	[ $devsize -lt $1 ] && _notrun "test dev too small"
+}
+
 _has_logdev()
 {
 	local ret=0
tests/generic/693 new file +14 -0
new file mode 100755
index 00000000..a6d1abff
@@ -0,0 +1,46 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto

tests/generic/693 line 24

Quoted 10 lines
tests/generic/693 new file +10 -0
+
+# Override the default cleanup function.
+_cleanup()
+{
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test_size $((4 * 1024 * 1024)) #kB

What does this new helper do that "_require_fs_space $TEST_DIR 4194304" wouldn't solve?

--D

Quoted 33 lines
tests/generic/693 new file +22 -0
+
+echo "Silence is golden"
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "pwrite -W 0 4G" $junk_file > /dev/null
+
+iblocks=`stat -c '%b' $junk_file`
+
+_test_cycle_mount
+
+iblocks_after_remount=`stat -c '%b' $junk_file`
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+fi
+
+status=0
+
+exit
tests/generic/693.out new file +2 -0
new file mode 100644
index 00000000..01884ea5
@@ -0,0 +1,2 @@
+QA output created by 693
+Silence is golden
Signature · 1 line
2.37.2
#6 lore raw
Quoted 59 lines · Darrick J. Wong
Quoted 58 lines · Pavel Reichl

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
  common/rc             | 10 ++++++++++
  tests/generic/693     | 46 +++++++++++++++++++++++++++++++++++++++++++
  tests/generic/693.out |  2 ++
  3 files changed, 58 insertions(+)

create mode 100755 tests/generic/693
create mode 100644 tests/generic/693.out

common/rc +10 -0
index 197c9415..06cbdee5 100644
@@ -1980,6 +1980,16 @@ _require_test()
      touch ${RESULT_DIR}/require_test
  }
 
+# require a test dev of a minimum size (in kb)
+_require_test_size()
+{
+	[ $# -eq 1 ] || _fail "_require_test_size: expected size param"
+
+	_require_test
+	local devsize=`_get_device_size $TEST_DEV`
+	[ $devsize -lt $1 ] && _notrun "test dev too small"
+}
+
  _has_logdev()
  {
  	local ret=0
tests/generic/693 new file +18 -0
new file mode 100755
index 00000000..a6d1abff
@@ -0,0 +1,46 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto
+
+# Override the default cleanup function.
+_cleanup()
+{
Quoted 8 lines

tests/generic/693 line 24

Quoted 6 lines
tests/generic/693 new file +6 -0
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test_size $((4 * 1024 * 1024)) #kB

What does this new helper do that "_require_fs_space $TEST_DIR 4194304" wouldn't solve?

Hello,

nothing  - I was not aware of that. I'll change it to use '_require_fs_space'

Thanks!

Quoted 35 lines

--D

Quoted 33 lines
tests/generic/693 new file +22 -0
+
+echo "Silence is golden"
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "pwrite -W 0 4G" $junk_file > /dev/null
+
+iblocks=`stat -c '%b' $junk_file`
+
+_test_cycle_mount
+
+iblocks_after_remount=`stat -c '%b' $junk_file`
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+fi
+
+status=0
+
+exit
tests/generic/693.out new file +2 -0
new file mode 100644
index 00000000..01884ea5
@@ -0,0 +1,2 @@
+QA output created by 693
+Silence is golden
Signature · 1 line
2.37.2
#7 lore raw

PATCH v3 1/1 generic: test i_blocks for large files

In reply to Darrick J. Wong

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---
 tests/generic/693     | 47 +++++++++++++++++++++++++++++++++++++++++++
 tests/generic/693.out |  2 ++
 2 files changed, 49 insertions(+)
 create mode 100755 tests/generic/693
 create mode 100644 tests/generic/693.out
tests/generic/693 new file +47 -0
new file mode 100755
index 00000000..29992ed0
@@ -0,0 +1,47 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto
+
+# Override the default cleanup function.
+_cleanup()
+{
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test
+_require_fs_space $TEST_DIR $((4 * 1024 * 1024)) #kB
+
+echo "Silence is golden"
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "pwrite -W 0 4G" $junk_file > /dev/null
+
+iblocks=`stat -c '%b' $junk_file`
+
+_test_cycle_mount
+
+iblocks_after_remount=`stat -c '%b' $junk_file`
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+fi
+
+status=0
+
+exit
tests/generic/693.out new file +2 -0
new file mode 100644
index 00000000..01884ea5
@@ -0,0 +1,2 @@
+QA output created by 693
+Silence is golden
Signature · 1 line
2.37.2
Reviewed-by on v3 1/1
#8 lore raw
Quoted 6 lines · Pavel Reichl

This is a regression test for an incorrect
computation of i_blocks for files larger than
4 GiB. Bug was filed for exFAT.

---

This version looks good to me, just a tiny problem, generic/693 has been taken by current upstream xfstests for-next branch, would you mind rebasing this patch to latest xfstests?

Anyway you can have:

Quoted 70 lines
 tests/generic/693     | 47 +++++++++++++++++++++++++++++++++++++++++++
 tests/generic/693.out |  2 ++
 2 files changed, 49 insertions(+)
 create mode 100755 tests/generic/693
 create mode 100644 tests/generic/693.out
tests/generic/693 new file +47 -0
new file mode 100755
index 00000000..29992ed0
@@ -0,0 +1,47 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022  Red Hat Inc. All Rights Reserved.
+#
+# FS QA Test 693
+#
+# Verify that i_blocks for files larger than 4 GiB have correct
+# values.
+#
+# This test verifies the problem fixed in kernel with commit
+# 0c336d6e33f4 exfat: fix incorrect loading of i_blocks for large files
+#
+. ./common/preamble
+_begin_fstest auto
+
+# Override the default cleanup function.
+_cleanup()
+{
+	cd /
+	rm -r -f $tmp.* $junk_dir
+}
+
+_supported_fs generic
+_require_test
+_require_fs_space $TEST_DIR $((4 * 1024 * 1024)) #kB
+
+echo "Silence is golden"
+
+junk_dir=$TEST_DIR/$seq
+junk_file=$junk_dir/junk
+mkdir -p $junk_dir
+
+$XFS_IO_PROG -f -c "pwrite -W 0 4G" $junk_file > /dev/null
+
+iblocks=`stat -c '%b' $junk_file`
+
+_test_cycle_mount
+
+iblocks_after_remount=`stat -c '%b' $junk_file`
+
+if [ "$iblocks" != "$iblocks_after_remount" ]; then
+	echo "Number of blocks needs to be same: $iblocks, $iblocks_after_remount"
+fi
+
+status=0
+
+exit
tests/generic/693.out new file +2 -0
new file mode 100644
index 00000000..01884ea5
@@ -0,0 +1,2 @@
+QA output created by 693
+Silence is golden
Signature · 1 line
2.37.2