FYI, we noticed the following commit (built with gcc-6): commit: 332391a9935da939319e473b4680e173df75afcf ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master in testcase: xfstests with following parameters: disk: 4HDD fs: xfs test: generic-slow2 test-description: xfstests is a regression test suite for xfs and other files ystems. test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git on test machine: qemu-system-x86_64 -enable-kvm -cpu qemu64,+ssse3 -smp 4 -m 4G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): +-------------------------------------------------------------------+------------+------------+ | | bb1cc74790 | 332391a993 | +-------------------------------------------------------------------+------------+------------+ | boot_successes | 62 | 24 | | boot_failures | 1 | 33 | | WARNING:at_fs/btrfs/extent-tree.c:#btrfs_free_block_groups[btrfs] | 1 | | | WARNING:at_fs/direct-io.c:#dio_complete | 0 | 25 | | WARNING:at_fs/iomap.c:#iomap_dio_complete | 0 | 8 | +-------------------------------------------------------------------+------------+------------+ [ 170.063040] WARNING: CPU: 0 PID: 33 at fs/iomap.c:731 iomap_dio_complete+0x129/0x130 [ 170.068758] Modules linked in: xfs dm_mod rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver sr_mod cdrom sg ata_generic pata_acpi ppdev ata_piix parport_pc snd_pcm snd_timer snd soundcore serio_raw pcspkr i2c_piix4 libata floppy parport ip_tables [ 170.074819] CPU: 0 PID: 33 Comm: kworker/0:1 Not tainted 4.14.0-rc1-00056-g332391a #1 [ 170.077915] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 170.081047] Workqueue: dio/vda iomap_dio_complete_work [ 170.081974] task: ffff88012e504a80 task.stack: ffffc90000758000 [ 170.084465] RIP: 0010:iomap_dio_complete+0x129/0x130 [ 170.085381] RSP: 0018:ffffc9000075be18 EFLAGS: 00010286 [ 170.087536] RAX: 00000000fffffff0 RBX: 0000000000000001 RCX: 000000000000000c [ 170.088853] RDX: 0000000000000000 RSI: ffffc9000075bc50 RDI: ffff880075715da9 [ 170.092113] RBP: ffffc9000075be30 R08: ffffc9000075bcf0 R09: ffff880075715da8 [ 170.093254] R10: 000000000000000c R11: 0000000000000000 R12: ffff88007afa9300 [ 170.096475] R13: ffff88007ac7ad80 R14: ffff88007afa9338 R15: ffff88007afa9330 [ 170.098187] FS: 0000000000000000(0000) GS:ffff88013fc00000(0000) knlGS:0000000000000000 [ 170.101322] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 170.102265] CR2: 00007f3ad48a8020 CR3: 000000007fe16000 CR4: 00000000000006f0 [ 170.104631] Call Trace: [ 170.105146] iomap_dio_complete_work+0x25/0x80 [ 170.106704] process_one_work+0x198/0x3e0 [ 170.107874] worker_thread+0x4e/0x3e0 [ 170.108522] kthread+0x114/0x150 [ 170.110683] ? process_one_work+0x3e0/0x3e0 [ 170.111362] ? kthread_create_on_node+0x40/0x40 [ 170.113111] ret_from_fork+0x25/0x30 [ 170.113752] Code: c9 74 17 49 63 74 24 28 41 8b 54 24 24 85 f6 0f 84 2a ff ff ff e9 3e ff ff ff 41 8b 74 24 28 49 8b 45 00 48 63 de e9 39 ff ff ff <0f> ff eb ca 0f 1f 00 0f 1f 44 00 00 55 48 83 ef 30 48 89 e5 41 [ 170.116540] ---[ end trace 23a07b952f574121 ]--- To reproduce: git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k job-script # job-script is attached in this email Thanks, Xiaolong