FYI, we noticed the following commit (built with gcc-7):
commit: 6b50831aa27e39e73086c1bc950bb57a9c9d4c0d ("btrfs: Add a simple buffered iomap
write")
https://github.com/goldwynr/linux btrfs-iomap
in testcase: ltp
with following parameters:
disk: 1HDD
fs: xfs
test: syscalls_part2
test-description: The LTP testsuite contains a collection of tools for testing the Linux
kernel and related features.
test-url:
http://linux-test-project.github.io/
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+----------------------------------------------------------------------------------+------------+------------+
| |
ab90a1f624 | 6b50831aa2 |
+----------------------------------------------------------------------------------+------------+------------+
| boot_successes | 37
| 0 |
| boot_failures | 33
| 68 |
| BUG:kernel_reboot-without-warning_in_test_stage | 20
| 2 |
| BUG:kernel_hang_in_boot_stage | 13
| 14 |
| WARNING:at_fs/btrfs/extent-tree.c:#btrfs_free_reserved_data_space_noquota[btrfs] | 0
| 52 |
| RIP:btrfs_free_reserved_data_space_noquota[btrfs] | 0
| 52 |
| WARNING:at_fs/btrfs/inode.c:#btrfs_destroy_inode[btrfs] | 0
| 46 |
| RIP:btrfs_destroy_inode[btrfs] | 0
| 46 |
| WARNING:at_fs/btrfs/extent-tree.c:#update_bytes_may_use[btrfs] | 0
| 10 |
| RIP:update_bytes_may_use[btrfs] | 0
| 10 |
| WARNING:at_fs/btrfs/extent-tree.c:#btrfs_free_block_groups[btrfs] | 0
| 46 |
| RIP:btrfs_free_block_groups[btrfs] | 0
| 46 |
+----------------------------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp(a)intel.com>
[ 752.577642] WARNING: CPU: 1 PID: 5590 at fs/btrfs/extent-tree.c:69
btrfs_free_reserved_data_space_noquota+0xf7/0x110 [btrfs]
[ 752.591998] Modules linked in: btrfs xor zstd_decompress zstd_compress raid6_pq ext4
mbcache jbd2 tun loop xfs libcrc32c dm_mod bochs_drm ttm sr_mod cdrom sg crct10dif_pclmul
drm_kms_helper crc32_pclmul ata_generic crc32c_intel pata_acpi ghash_clmulni_intel
syscopyarea sysfillrect sysimgblt ppdev fb_sys_fops snd_pcm drm snd_timer snd ata_piix
aesni_intel crypto_simd cryptd glue_helper soundcore libata joydev pcspkr serio_raw floppy
i2c_piix4 parport_pc parport ip_tables
[ 752.610424] ioctl01 5 TPASS : failed as expected: TEST_ERRNO=EFAULT(14): Bad
address
[ 752.610435]
[ 752.622071] CPU: 1 PID: 5590 Comm: ioctl08 Not tainted 5.2.0-rc5-00004-g6b50831 #1
[ 752.622075] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 752.622203] RIP: 0010:btrfs_free_reserved_data_space_noquota+0xf7/0x110 [btrfs]
[ 752.622210] Code: ee e8 9d ba 60 c9 49 8b 04 24 48 85 c0 75 da 65 ff 0d a5 19 82 3f e9
79 ff ff ff 48 89 c1 48 f7 d9 48 39 ca 0f 83 5e ff ff ff <0f> 0b 48 c7 43 28 00 00
00 00 e9 56 ff ff ff 66 2e 0f 1f 84 00 00
[ 752.642700] ioctl01_02 1 TPASS : ioctl01 Passed with /dev/tty59
[ 752.642711]
[ 752.645239] RSP: 0018:ffff9f53c5413768 EFLAGS: 00010287
[ 752.645246] RAX: fffffffffffff000 RBX: ffff8e2fd8843e00 RCX: 0000000000001000
[ 752.645247] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8e2fd8843e00
[ 752.645249] RBP: 0000000000000fff R08: 0000000000004000 R09: ffff8e2fd8390000
[ 752.645250] R10: ffff8e2fd834d800 R11: ffff9f53c5413a44 R12: ffff8e301027dc80
[ 752.645252] R13: ffff8e2fd8390000 R14: ffff8e2fd834d800 R15: ffff9f53c5413864
[ 752.645255] FS: 00007f975bf78500(0000) GS:ffff8e307fd00000(0000)
knlGS:0000000000000000
[ 752.645257] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 752.645259] CR2: 00007f975ba996e0 CR3: 0000000198178000 CR4: 00000000000006e0
[ 752.645270] Call Trace:
[ 752.645402] btrfs_clear_delalloc_extent+0x1a1/0x420 [btrfs]
[ 752.645415] ? _cond_resched+0x19/0x30
[ 752.667733]
[ 752.672014] clear_state_bit+0x75/0x1b0 [btrfs]
[ 752.672058] __clear_extent_bit+0x222/0x440 [btrfs]
[ 752.688932] ioctl01_02 0 TINFO : Testing ioctl01 with /dev/tty6
[ 752.688945]
[ 752.693246] extent_clear_unlock_delalloc+0x43/0x70 [btrfs]
[ 752.693284] cow_file_range+0x37b/0x430 [btrfs]
[ 752.726049] ioctl01 1 TPASS : failed as expected: TEST_ERRNO=EBADF(9): Bad file
descriptor
[ 752.726057]
[ 752.728410] btrfs_run_delalloc_range+0xe4/0x4b0 [btrfs]
[ 752.728451] ? find_lock_delalloc_range+0x1f0/0x220 [btrfs]
[ 752.755397] ioctl01 2 TPASS : failed as expected: TEST_ERRNO=EFAULT(14): Bad
address
[ 752.755407]
[ 752.756101] writepage_delalloc+0x104/0x150 [btrfs]
[ 752.779612] ioctl01 3 TPASS : failed as expected: TEST_ERRNO=ENOTTY(25):
Inappropriate ioctl for device
[ 752.779622]
[ 752.781927] __extent_writepage+0x190/0x320 [btrfs]
[ 752.781954] extent_write_cache_pages+0x240/0x400 [btrfs]
[ 752.806258] ? __set_extent_bit+0x4f7/0x630 [btrfs]
[ 752.806742] ioctl01 4 TPASS : failed as expected: TEST_ERRNO=ENOTTY(25):
Inappropriate ioctl for device
[ 752.806748]
[ 752.808586] ? block_rsv_release_bytes+0x33/0x160 [btrfs]
[ 752.808616] extent_writepages+0x52/0xa0 [btrfs]
[ 752.823726] do_writepages+0x4b/0xf0
[ 752.829269] ? __filemap_fdatawrite_range+0xc1/0x100
[ 752.831284] ioctl01 5 TPASS : failed as expected: TEST_ERRNO=EFAULT(14): Bad
address
[ 752.831293]
[ 752.832362] __filemap_fdatawrite_range+0xc1/0x100
[ 752.832445] btrfs_fdatawrite_range+0x1b/0x50 [btrfs]
[ 752.845708] btrfs_wait_ordered_range+0x40/0x100 [btrfs]
[ 752.849193] ? _cond_resched+0x19/0x30
[ 752.851096] btrfs_remap_file_range+0xfb/0x3e0 [btrfs]
[ 752.852824] ioctl01_02 1 TPASS : ioctl01 Passed with /dev/tty6
[ 752.852832]
[ 752.853308] vfs_dedupe_file_range_one+0x137/0x150
[ 752.853312] vfs_dedupe_file_range+0x159/0x1c0
[ 752.864461] do_vfs_ioctl+0x279/0x6f0
[ 752.866818] ksys_ioctl+0x70/0x80
[ 752.868194]
[ 752.868998] __x64_sys_ioctl+0x16/0x20
[ 752.872968] do_syscall_64+0x5b/0x1e0
[ 752.875113] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 752.878196] RIP: 0033:0x7f975ba9f017
[ 752.880869] Code: 00 00 00 48 8b 05 81 7e 2b 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff
ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01
c3 48 8b 0d 51 7e 2b 00 f7 d8 64 89 01 48
[ 752.883534] ioctl01_02 0 TINFO : Testing ioctl01 with /dev/tty60
[ 752.883540]
[ 752.887099] RSP: 002b:00007ffe85ae2798 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 752.887102] RAX: ffffffffffffffda RBX: 000055917783a0b0 RCX: 00007f975ba9f017
[ 752.887103] RDX: 000055917783a0b0 RSI: 00000000c0189436 RDI: 0000000000000007
[ 752.887104] RBP: 0000559177256020 R08: 0000000000000008 R09: 000055917704d6b5
[ 752.887105] R10: 0000000000000370 R11: 0000000000000246 R12: 00007f975bf78498
[ 752.887106] R13: 0000000000000000 R14: 000055917704de10 R15: 0000000000000001
[ 752.887112] ---[ end trace f25bd001ff1f9a4e ]---
To reproduce:
# build kernel
cd linux
cp config-5.2.0-rc5-00004-g6b50831 .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in
this email
Thanks,
lkp