ci2 starts bisection 2025-09-08 12:07:26.385351775 +0000 UTC m=+381961.374325611 bisecting cause commit starting from 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c building syzkaller on d291dd2d58a1885c00a60561048b6ceb1bf1206a ensuring issue is reproducible on original commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c testing commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: a8f033e992cb42c5e7856f42cef1d41a339ce4852e32e7d4bcf145c8db61380c all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] check whether we can drop unnecessary instrumentation disabling configs for [kasan locking atomic_sleep hang memleak ubsan], they are not needed testing commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 58153af10640b5a08dbef2f4ec28529154a447cce46810f7b6d41b12796ab93c all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] the bug reproduces without the instrumentation disabling configs for [ubsan kasan locking atomic_sleep hang memleak], they are not needed kconfig minimization: base=4092 full=8349 leaves diff=2173 split chunks (needed=false): <2173> split chunk #0 of len 2173 into 5 parts testing without sub-chunk 1/5 disabling configs for [locking atomic_sleep hang memleak ubsan kasan], they are not needed testing commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 3f2824eed15d63e5738642de11e057c9e5ba8107217abf0f074ce0812b5414e4 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] the chunk can be dropped testing without sub-chunk 2/5 disabling configs for [memleak ubsan kasan locking atomic_sleep hang], they are not needed testing commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 63f171d9a6cdce01e030bf14379001a3fd6d7f22b4eade4598293067f005f8c6 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] the chunk can be dropped testing without sub-chunk 3/5 disabling configs for [ubsan kasan locking atomic_sleep hang memleak], they are not needed testing commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: cc14126bb9a831c835de51410ff217d5d9f6761c766bebd0168ff276142f155c all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] the chunk can be dropped testing without sub-chunk 4/5 disabling configs for [atomic_sleep hang memleak ubsan kasan locking], they are not needed testing commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: d561736c1b253671974477bd4dda21751bd9383d320c983005eca13b74a8fb52 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] the chunk can be dropped testing without sub-chunk 5/5 disabling configs for [hang memleak ubsan kasan locking atomic_sleep], they are not needed testing commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: cc57c9721e58a8f5d5b8002151850cb54bcc58899c9ee0ea32f08040c082d5a3 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] the chunk can be dropped disabling configs for [locking atomic_sleep hang memleak ubsan kasan], they are not needed picked [v6.16 v6.15 v6.14 v6.12 v6.10 v6.8 v6.6 v6.4 v6.1 v5.18 v5.15 v5.12 v5.9 v5.6 v5.3 v5.0 v4.19] out of 39 release tags testing release v6.16 testing commit 038d61fd642278bab63ee8ef722c50d10ab01e8f gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 80bc7d714906639f84b1c0fad57c6d0dd440f75096c34aaf87e91212053eebba all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.15 testing commit 0ff41df1cb268fc69e703a08a57ee14ae967d0ca gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 5581a08c57bb2d3a251dcc2689ab615df7cb3a0670a534ff459e8d0a74779189 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.14 testing commit 38fec10eb60d687e30c8c6b5420d86e8149f7557 gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 93528c96edce746c0691cc28b40226c5fa615dc3263d89c018446110fce3fe9a all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.12 testing commit adc218676eef25575469234709c2d87185ca223a gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 99044fd2d45d8ab3938dc5e8157e08895c479dac9794b537f1b5a4beb31a5f79 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.10 testing commit 0c3836482481200ead7b416ca80c68a29cfdaabd gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: cd1ae622630d8dc5442ae3040c2b4b06cdb78b52298ecf580b29af5d0bf6b0ec all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.8 testing commit e8f897f4afef0031fe618a8e94127a0934896aba gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 017fbfa5a888e25115c7c0c2539fb95c6abfa563f3721022ef6a7bfe9d1328ae all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.6 testing commit ffc253263a1375a65fa6c9f62a893e9767fbebfa gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 55c20a02eff101347e2ddea4c9ec1ba1aa46d648df69d98bed3a23e156d13816 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.4 testing commit 6995e2de6891c724bfeb2db33d7b87775f913ad1 gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 kernel signature: 76ea496224eeb22c694d5f9bf09806e22761e2da65da7e0b868166b4cd7c409a all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v6.1 testing commit 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 failed building 830b3c68c1fb1e9176028d02ef86f3cf76aa2476: ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined llvm-objdump: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory llvm-objcopy: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory testing release v5.18 testing commit 4b0986a3613c92f4ec1bdc7f60ec66fea135991f gcc compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 failed building 4b0986a3613c92f4ec1bdc7f60ec66fea135991f: scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is deprecated [-Wdeprecated-declarations] /usr/include/openssl/err.h:422:1: note: 'ERR_get_error_line' has been explicitly marked deprecated here scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is deprecated [-Wdeprecated-declarations] certs/extract-cert.c:46:14: warning: 'ERR_get_error_line' is deprecated [-Wdeprecated-declarations] certs/extract-cert.c:59:9: warning: 'ERR_get_error_line' is deprecated [-Wdeprecated-declarations] ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined llvm-objdump: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory llvm-objcopy: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory testing release v5.15 testing commit 8bb7eca972ad531c9b149c0a51ab43a417385813 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 590224ce26da473e0ed5a715de6903d36e691fa45a6e02ad270c849000eb6f52 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] testing release v5.12 testing commit 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 99dee7fe120714e3f98e3b7ce42f39a437571f9afcddb2e04f92e94b3e4be2b3 all runs: OK false negative chance: 0.000 # git bisect start 8bb7eca972ad531c9b149c0a51ab43a417385813 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 Bisecting: 23811 revisions left to test after this (roughly 15 steps) [bcb9928a155444dbd212473e60241ca0a7f641e1] net: dsa: properly check for the bridge_leave methods in dsa_switch_bridge_leave() testing commit bcb9928a155444dbd212473e60241ca0a7f641e1 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: e8ed672f1ab38f4950a583378d4c0a3358434858fd965e30d0e62131d131a324 run #0: crashed: WARNING in update_blocked_averages run #1: boot failed: WARNING in get_page_from_freelist run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK representative crash: WARNING in update_blocked_averages, types: [WARNING] unable to determine the verdict: 8 good runs (wanted 5), for bad wanted 5 in total, got 9 # git bisect skip bcb9928a155444dbd212473e60241ca0a7f641e1 Bisecting: 23811 revisions left to test after this (roughly 15 steps) [f36ef407628835a7d7fb3d235b1f1aac7022d9a3] selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random testing commit f36ef407628835a7d7fb3d235b1f1aac7022d9a3 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: e8354e0cc015de68b15b693887f471d2bad647335458f0c1b31a9fd543fcb27a run #0: boot failed: WARNING in get_page_from_freelist run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK false negative chance: 0.000 # git bisect good f36ef407628835a7d7fb3d235b1f1aac7022d9a3 Bisecting: 14485 revisions left to test after this (roughly 14 steps) [ae954bbc451d267f7d60d7b49db811d5a68ebd7b] sctp: move the active_key update after sh_keys is added testing commit ae954bbc451d267f7d60d7b49db811d5a68ebd7b gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 7c13c28122149a7489f612c006bd5c247af11420192e5982f064b5b48737fe29 all runs: OK false negative chance: 0.000 # git bisect good ae954bbc451d267f7d60d7b49db811d5a68ebd7b Bisecting: 6693 revisions left to test after this (roughly 13 steps) [477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6] Merge tag 'drm-next-2021-08-31-1' of git://anongit.freedesktop.org/drm/drm testing commit 477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 53bfa604ac48d69d6b478c7e66105bd8f673ccb8976eb97bdafeaa2976fb4966 all runs: OK false negative chance: 0.000 # git bisect good 477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6 Bisecting: 3317 revisions left to test after this (roughly 12 steps) [626bf91a292e2035af5b9d9cce35c5c138dfe06d] Merge tag 'net-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net testing commit 626bf91a292e2035af5b9d9cce35c5c138dfe06d gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: a67b30c83d60f09d79d0b1599e943b2ebd270fd0a39481e69d72113190b33a85 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad 626bf91a292e2035af5b9d9cce35c5c138dfe06d Bisecting: 1702 revisions left to test after this (roughly 11 steps) [23852bec534a1633dc08f4df88b8493ae99953a9] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma testing commit 23852bec534a1633dc08f4df88b8493ae99953a9 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 9f6c38810684deb44cdd48297083cae49235e373a9522a22be8e6dce67a63639 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad 23852bec534a1633dc08f4df88b8493ae99953a9 Bisecting: 839 revisions left to test after this (roughly 10 steps) [9e5f3ffcf1cb34e7c7beb3f79a96f58536730924] Merge tag 'devicetree-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux testing commit 9e5f3ffcf1cb34e7c7beb3f79a96f58536730924 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: ab8b2e36811bd99a77ffc0d8f96789c5058ed8ad7cfdd99afab8279d5e619c13 all runs: OK false negative chance: 0.000 # git bisect good 9e5f3ffcf1cb34e7c7beb3f79a96f58536730924 Bisecting: 417 revisions left to test after this (roughly 9 steps) [89b6b8cd92c068cd1bdf877ec7fb1392568ef35d] Merge tag 'vfio-v5.15-rc1' of git://github.com/awilliam/linux-vfio testing commit 89b6b8cd92c068cd1bdf877ec7fb1392568ef35d gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 9222cfd457555440deb54d78744cd2e1bb5d32514d5ac46bbe0403490dbe087e all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad 89b6b8cd92c068cd1bdf877ec7fb1392568ef35d Bisecting: 210 revisions left to test after this (roughly 8 steps) [412106c203b759fa7fbcc4f855a90ab18e681ccb] Merge tag 'erofs-for-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs testing commit 412106c203b759fa7fbcc4f855a90ab18e681ccb gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: d1de75caaf5b04a7d762f7a6d0ac80b6db200243e0b7e9a3cc805dd6741e834e all runs: OK false negative chance: 0.000 # git bisect good 412106c203b759fa7fbcc4f855a90ab18e681ccb Bisecting: 107 revisions left to test after this (roughly 7 steps) [c815f04ba94940fbc303a6ea9669e7da87f8e77d] Merge tag 'linux-kselftest-kunit-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest testing commit c815f04ba94940fbc303a6ea9669e7da87f8e77d gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 0b7e4ee4343128ef72e2f730d9c16784fc3cf6d634cd3b4e6e15d8f526bff118 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad c815f04ba94940fbc303a6ea9669e7da87f8e77d Bisecting: 45 revisions left to test after this (roughly 6 steps) [265113f70f3d63ae8b6eb1ce4303d14dbbd71b2d] Merge tag 'dlm-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm testing commit 265113f70f3d63ae8b6eb1ce4303d14dbbd71b2d gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 9af77fa8c4e5192193dc0894d89b062d91e82179a8866e0825f4e0a1f483b748 all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad 265113f70f3d63ae8b6eb1ce4303d14dbbd71b2d Bisecting: 33 revisions left to test after this (roughly 5 steps) [baaae979b112642a41b71c71c599d875c067d257] ext4: make the updating inode data procedure atomic testing commit baaae979b112642a41b71c71c599d875c067d257 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: de6ce0f33e5f43010377fafc19c31c1bb61a703d05a521692d502e5963618c8e all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad baaae979b112642a41b71c71c599d875c067d257 Bisecting: 11 revisions left to test after this (roughly 4 steps) [b2bbb92f7042e8075fb036bf97043339576330c3] ext4: fix e2fsprogs checksum failure for mounted filesystem testing commit b2bbb92f7042e8075fb036bf97043339576330c3 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: db731c4f2c6c17b5568fb823568f6665602ea8b4458b9c95d9d4a4ed31413cda all runs: OK false negative chance: 0.000 # git bisect good b2bbb92f7042e8075fb036bf97043339576330c3 Bisecting: 5 revisions left to test after this (roughly 3 steps) [25c6d98fc4c245d164cf688815a7b259257ead2a] ext4: Move orphan inode handling into a separate file testing commit 25c6d98fc4c245d164cf688815a7b259257ead2a gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: a5f6158aa85b60ead5b3ff852811459b28537cd20ddfbf4f9dd15788b282bb6a all runs: OK false negative chance: 0.000 # git bisect good 25c6d98fc4c245d164cf688815a7b259257ead2a Bisecting: 2 revisions left to test after this (roughly 2 steps) [4a79a98c7b19dd3d4cfe9200fbc384ba9119e039] ext4: Improve scalability of ext4 orphan file handling testing commit 4a79a98c7b19dd3d4cfe9200fbc384ba9119e039 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 4d73f32349b6cabada55a9b0a9883c17b250021e5b34cea060b108256333167f all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad 4a79a98c7b19dd3d4cfe9200fbc384ba9119e039 Bisecting: 1 revision left to test after this (roughly 1 step) [02f310fcf47fa9311d6ba2946a8d19e7d7d11f37] ext4: Speedup ext4 orphan inode handling testing commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 3048fcfd2998fa8ce0f3612acef69885df348158b1f0cc3701b7f6d5d2cf2cbb all runs: crashed: WARNING in ext4_init_orphan_info representative crash: WARNING in ext4_init_orphan_info, types: [WARNING] # git bisect bad 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 is the first bad commit commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 Author: Jan Kara Date: Mon Aug 16 11:57:06 2021 +0200 ext4: Speedup ext4 orphan inode handling Ext4 orphan inode handling is a bottleneck for workloads which heavily truncate / unlink small files since it contends on the global s_orphan_mutex lock (and generally it's difficult to improve scalability of the ondisk linked list of orphaned inodes). This patch implements new way of handling orphan inodes. Instead of linking orphaned inode into a linked list, we store it's inode number in a new special file which we call "orphan file". Only if there's no more space in the orphan file (too many inodes are currently orphaned) we fall back to using old style linked list. Currently we protect operations in the orphan file with a spinlock for simplicity but even in this setting we can substantially reduce the length of the critical section and thus speedup some workloads. In the next patch we improve this by making orphan handling lockless. Note that the change is backwards compatible when the filesystem is clean - the existence of the orphan file is a compat feature, we set another ro-compat feature indicating orphan file needs scanning for orphaned inodes when mounting filesystem read-write. This ro-compat feature gets cleared on unmount / remount read-only. Some performance data from 80 CPU Xeon Server with 512 GB of RAM, filesystem located on SSD, average of 5 runs: stress-orphan (microbenchmark truncating files byte-by-byte from N processes in parallel) Threads Time Time Vanilla Patched 1 1.057200 0.945600 2 1.680400 1.331800 4 2.547000 1.995000 8 7.049400 6.424200 16 14.827800 14.937600 32 40.948200 33.038200 64 87.787400 60.823600 128 206.504000 122.941400 So we can see significant wins all over the board. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210816095713.16537-3-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 69 +++++++++-- fs/ext4/inode.c | 3 +- fs/ext4/orphan.c | 340 ++++++++++++++++++++++++++++++++++++++++++++++++------- fs/ext4/super.c | 34 +++++- 4 files changed, 394 insertions(+), 52 deletions(-) accumulated error probability: 0.00 culprit signature: 3048fcfd2998fa8ce0f3612acef69885df348158b1f0cc3701b7f6d5d2cf2cbb parent signature: a5f6158aa85b60ead5b3ff852811459b28537cd20ddfbf4f9dd15788b282bb6a revisions tested: 33, total time: 7h43m24.481984374s (build: 3h15m16.102799627s, test: 4h8m40.773817452s) first bad commit: 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 ext4: Speedup ext4 orphan inode handling recipients (to): ["jack@suse.cz" "tytso@mit.edu"] recipients (cc): [] crash: WARNING in ext4_init_orphan_info loop3: detected capacity change from 0 to 512 EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, O_DIRECT and fast_commit support! EXT4-fs (loop3): encrypted files will use data=ordered instead of data journaling mode ------------[ cut here ]------------ WARNING: CPU: 0 PID: 3101 at mm/page_alloc.c:5363 __alloc_pages+0x968/0x1080 mm/page_alloc.c:5363 Modules linked in: CPU: 0 PID: 3101 Comm: syz.3.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 RIP: 0010:__alloc_pages+0x968/0x1080 mm/page_alloc.c:5363 Code: 00 00 89 44 24 60 a8 01 74 1a 65 48 8b 04 25 c0 6e 01 00 f3 90 8b 90 38 11 00 00 f6 c2 01 75 f3 89 54 24 60 e9 b3 f9 ff ff 90 <0f> 0b 90 e9 b7 f8 ff ff 48 8b 7c 24 10 44 89 fe e8 43 d7 ff ff 48 RSP: 0018:ffffc900020cfb40 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000cc0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000000000000000e RDI: 0000000000000000 RBP: ffff888236f4e000 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 R13: 000000000000000e R14: 0000000003fffff0 R15: 0000000000000000 FS: 00007f2f708716c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056303a29b620 CR3: 000000010c122000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kmalloc_order+0x24/0x90 mm/slab_common.c:955 kmalloc_order_trace+0x14/0xa0 mm/slab_common.c:971 kmalloc include/linux/slab.h:596 [inline] ext4_init_orphan_info+0xeb/0x400 fs/ext4/orphan.c:567 ext4_fill_super+0x268c/0x3940 fs/ext4/super.c:4933 mount_bdev+0x185/0x1b0 fs/super.c:1368 legacy_get_tree+0x2b/0x50 fs/fs_context.c:610 vfs_get_tree+0x23/0xc0 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x438/0xb50 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0xfe/0x140 fs/namespace.c:3433 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3c/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f2f70a0238a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2f70870e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f2f70870ef0 RCX: 00007f2f70a0238a RDX: 0000200000000040 RSI: 00002000000001c0 RDI: 00007f2f70870eb0 RBP: 0000200000000040 R08: 00007f2f70870ef0 R09: 0000000000000c04 R10: 0000000000000c04 R11: 0000000000000246 R12: 00002000000001c0 R13: 00007f2f70870eb0 R14: 0000000000000448 R15: 0000200000000580