Message ID | 20190930104339.24919-17-jack@suse.cz |
---|---|
State | Superseded |
Headers | show |
Series | ext4: Fix transaction overflow due to revoke descriptors | expand |
On Mon, Sep 30, 2019 at 08:26:27PM +0800, kbuild test robot wrote: > Hi Jan, > > I love your patch! Yet something to improve: > > [auto build test ERROR on ext4/dev] > [cannot apply to v5.3 next-20190930] > [if your patch is applied to the wrong git tree, please drop us a note to help > improve the system. BTW, we also suggest to use '--base' option to specify the > base tree in git format-patch, please see https://stackoverflow.com/a/37406982] > > url: https://github.com/0day-ci/linux/commits/Jan-Kara/ext4-Fix-transaction-overflow-due-to-revoke-descriptors/20190930-184615 > base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev > config: x86_64-randconfig-a004-201939 (attached as .config) > compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot <lkp@intel.com> > > All errors (new ones prefixed by >>): > > fs/jbd2/transaction.c: In function 'jbd2_journal_start_reserved': > >> fs/jbd2/transaction.c:596:20: error: 'handle_t {aka struct jbd2_journal_handle}' has no member named 'h_buffer_credits' > line_no, handle->h_buffer_credits); > ^ Yep, it looks like this instance of h_buffer_credits was missed in the patch, probably because Jan wasn't building with tracepoints enabled. I noticed this when I tried to do a test build. - Ted
On Mon 30-09-19 11:05:53, Theodore Y. Ts'o wrote: > On Mon, Sep 30, 2019 at 08:26:27PM +0800, kbuild test robot wrote: > > Hi Jan, > > > > I love your patch! Yet something to improve: > > > > [auto build test ERROR on ext4/dev] > > [cannot apply to v5.3 next-20190930] > > [if your patch is applied to the wrong git tree, please drop us a note to help > > improve the system. BTW, we also suggest to use '--base' option to specify the > > base tree in git format-patch, please see https://stackoverflow.com/a/37406982] > > > > url: https://github.com/0day-ci/linux/commits/Jan-Kara/ext4-Fix-transaction-overflow-due-to-revoke-descriptors/20190930-184615 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev > > config: x86_64-randconfig-a004-201939 (attached as .config) > > compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 > > reproduce: > > # save the attached .config to linux build tree > > make ARCH=x86_64 > > > > If you fix the issue, kindly add following tag > > Reported-by: kbuild test robot <lkp@intel.com> > > > > All errors (new ones prefixed by >>): > > > > fs/jbd2/transaction.c: In function 'jbd2_journal_start_reserved': > > >> fs/jbd2/transaction.c:596:20: error: 'handle_t {aka struct jbd2_journal_handle}' has no member named 'h_buffer_credits' > > line_no, handle->h_buffer_credits); > > ^ > > Yep, it looks like this instance of h_buffer_credits was missed in the > patch, probably because Jan wasn't building with tracepoints enabled. > I noticed this when I tried to do a test build. The problem was that my patches were based on a kernel that didn't have this code yet. I've rebased now on current Linus' tree and fixed this up in my local tree (along with couple documentation warnings). But I don't think it's worth resending just for this. Honza
On Mon, Sep 30, 2019 at 06:25:36PM +0200, Jan Kara wrote: > The problem was that my patches were based on a kernel that didn't have > this code yet. I've rebased now on current Linus' tree and fixed this up in > my local tree (along with couple documentation warnings). But I don't think > it's worth resending just for this. Oh, agreed, it's not worth resending for this; it was a quick fixup. How much testing have you given this patch series? I did a quick xfstests run, and I found the following new failures when this was applied on top of the dev branch on ext4.git (e.g., what got sent to Linus as a pull request). ext4/4k: Failures: ext4/026 generic/233 ext4/1k: Failures: ext4/026 ext4/ext3: Failures: ext4/026 generic/233 ext4/encrypt: Failures: generic/083 ext4/nojournal: Failures: ext4/301 ext4/adv: Failures: ext4/026 generic/233 generic/269 generic/270 generic/476 ext4/dioread_nolock: Failures: ext4/026 generic/233 ext4/data_journal: Failures: generic/233 ext4/bigalloc: Failures: generic/013 generic/014 generic/051 generic/083 generic/232 generic/233 generic/269 generic/270 generic/299 generic/429 generic/475 generic/476 ext4/bigalloc_1k: Failures: ext4/026 generic/013 generic/014 generic/032 generic/051 generic/068 generic/083 generic/232 generic/233 generic/269 generic/270 generic/320 generic/475 generic/476 I haven't trianged them all yet, but here are the details for the two biggies: ext4/026 and generic/233. - Ted ext4/026 [14:11:43][ 14.287850] run fstests ext4/026 at 2019-09-30 14:11:43 [ 14.821933] WARNING: CPU: 0 PID: 1542 at fs/jbd2/revoke.c:394 jbd2_journal_revoke+0x14b/0x160 [ 14.824000] CPU: 0 PID: 1542 Comm: rm Not tainted 5.3.0-rc4-xfstests-00019-ga8d18e88fd60-dirty #1201 [ 14.826111] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 14.828039] RIP: 0010:jbd2_journal_revoke+0x14b/0x160 [ 14.829217] Code: 4c 89 f7 e8 77 8c ef ff eb a6 e8 d0 8d ef ff 48 85 c0 49 89 c6 74 99 48 8b 00 a9 00 00 10 00 0f 84 5b ff ff ff e9 71 06 00 00 <0f> 0b eb 89 0f 0b 0f 0b 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f [ 14.833505] RSP: 0018:ffffae0ec2683ad8 EFLAGS: 00010246 [ 14.834721] RAX: 0000000000000000 RBX: ffff951876a9f410 RCX: 1111111111111120 [ 14.836287] RDX: 0000000000000004 RSI: 0000000000000006 RDI: ffff951876a9f410 [ 14.837853] RBP: ffff951874f1f6c8 R08: 0000000373745034 R09: 0000000000000000 [ 14.839244] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000840d [ 14.840799] R13: ffff951876695000 R14: ffff951876a9f410 R15: 0000000000000001 [ 14.842349] FS: 00007f39e17b5540(0000) GS:ffff95187d800000(0000) knlGS:0000000000000000 [ 14.844125] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 14.845403] CR2: 00007f39e16ba4a0 CR3: 0000000075b9e006 CR4: 0000000000360ef0 [ 14.847055] Call Trace: [ 14.847628] __ext4_forget+0xf2/0x280 [ 14.848470] ext4_free_blocks+0x9c8/0xc00 [ 14.849270] ? __lock_acquire+0x447/0x7c0 [ 14.850174] ? kvm_sched_clock_read+0x14/0x30 [ 14.851182] ext4_remove_blocks+0x33c/0x630 [ 14.852190] ext4_ext_rm_leaf+0x1fb/0x7a0 [ 14.853493] ext4_ext_remove_space+0x556/0xa80 [ 14.855020] ? ext4_es_remove_extent+0x9d/0x180 [ 14.856325] ext4_truncate+0x413/0x520 [ 14.857374] ext4_evict_inode+0x29c/0x670 [ 14.858329] evict+0xd0/0x1a0 [ 14.859157] ext4_xattr_inode_array_free+0x27/0x40 [ 14.860341] ext4_evict_inode+0x31c/0x670 [ 14.861344] evict+0xd0/0x1a0 [ 14.862107] do_unlinkat+0x1cd/0x2e0 [ 14.862769] do_syscall_64+0x50/0x1b0 [ 14.863387] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 14.864219] RIP: 0033:0x7f39e16deff7 [ 14.864813] Code: 73 01 c3 48 8b 0d 99 ee 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 69 ee 0c 00 f7 d8 64 89 01 48 [ 14.867949] RSP: 002b:00007fff3ed46068 EFLAGS: 00000246 ORIG_RAX: 0000000000000107 [ 14.869197] RAX: ffffffffffffffda RBX: 0000561d094937b0 RCX: 00007f39e16deff7 [ 14.870371] RDX: 0000000000000000 RSI: 0000561d09492340 RDI: 00000000ffffff9c [ 14.871544] RBP: 0000561d094922b0 R08: 0000000000000003 R09: 0000000000000000 [ 14.872766] R10: 0000000000000100 R11: 0000000000000246 R12: 00007fff3ed46250 [ 14.873950] R13: 0000000000000000 R14: 0000561d094937b0 R15: 0000000000000000 [ 14.875156] irq event stamp: 2176 [ 14.875720] hardirqs last enabled at (2175): [<ffffffffb16663e1>] kmem_cache_free+0x51/0x220 [ 14.877150] hardirqs last disabled at (2176): [<ffffffffb14016aa>] trace_hardirqs_off_thunk+0x1a/0x20 [ 14.878702] softirqs last enabled at (814): [<ffffffffb14297f3>] fpu__clear+0xb3/0x1b0 [ 14.880055] softirqs last disabled at (812): [<ffffffffb14297b5>] fpu__clear+0x75/0x1b0 [ 14.881926] ---[ end trace 4d44757f1901181f ]--- _check_dmesg: something found in dmesg (see /results/ext4/results-4k/ext4/026.dmesg) [14:11:44] generic/233 [14:18:34][ 19.736637] run fstests generic/233 at 2019-09-30 14:18:34 [ 21.400934] EXT4-fs (vdc): Delayed block allocation failed for inode 131809 at logical offset 209 with max blocks 9 with error 122 [ 21.404197] EXT4-fs (vdc): This should not happen!! Data will be lost [ 21.404197] [14:18:36] 2s
On Mon 30-09-19 17:21:45, Theodore Y. Ts'o wrote: > On Mon, Sep 30, 2019 at 06:25:36PM +0200, Jan Kara wrote: > > The problem was that my patches were based on a kernel that didn't have > > this code yet. I've rebased now on current Linus' tree and fixed this up in > > my local tree (along with couple documentation warnings). But I don't think > > it's worth resending just for this. > > Oh, agreed, it's not worth resending for this; it was a quick fixup. > > How much testing have you given this patch series? I did a quick > xfstests run, and I found the following new failures when this was > applied on top of the dev branch on ext4.git (e.g., what got sent to > Linus as a pull request). I did run e.g. ext4/4k, ext4/1k, ext4/nojournal, ext4/datajournal. But my setup does not run ext4/026 (too old e2fsprogs it seems - I need to update those). I have cathegorized generic/233 as preexisting failure but I might be wrong and it definitely failed differently for me. Anyway, thanks for running these tests, I'll check more what's going on. Honza > ext4/4k: > Failures: ext4/026 generic/233 > ext4/1k: > Failures: ext4/026 > ext4/ext3: > Failures: ext4/026 generic/233 > ext4/encrypt: > Failures: generic/083 > ext4/nojournal: > Failures: ext4/301 > ext4/adv: > Failures: ext4/026 generic/233 generic/269 generic/270 generic/476 > ext4/dioread_nolock: > Failures: ext4/026 generic/233 > ext4/data_journal: > Failures: generic/233 > ext4/bigalloc: > Failures: generic/013 generic/014 generic/051 generic/083 > generic/232 generic/233 generic/269 generic/270 generic/299 > generic/429 generic/475 generic/476 > ext4/bigalloc_1k: > Failures: ext4/026 generic/013 generic/014 generic/032 generic/051 > generic/068 generic/083 generic/232 generic/233 generic/269 > generic/270 generic/320 generic/475 generic/476 > > I haven't trianged them all yet, but here are the details for the two > biggies: ext4/026 and generic/233. > > - Ted > > ext4/026 [14:11:43][ 14.287850] run fstests ext4/026 at 2019-09-30 14:11:43 > [ 14.821933] WARNING: CPU: 0 PID: 1542 at fs/jbd2/revoke.c:394 jbd2_journal_revoke+0x14b/0x160 > [ 14.824000] CPU: 0 PID: 1542 Comm: rm Not tainted 5.3.0-rc4-xfstests-00019-ga8d18e88fd60-dirty #1201 > [ 14.826111] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 > [ 14.828039] RIP: 0010:jbd2_journal_revoke+0x14b/0x160 > [ 14.829217] Code: 4c 89 f7 e8 77 8c ef ff eb a6 e8 d0 8d ef ff 48 85 c0 49 89 c6 74 99 48 8b 00 a9 00 00 10 00 0f 84 5b ff ff ff e9 71 06 00 00 <0f> 0b eb 89 0f 0b 0f 0b 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f > [ 14.833505] RSP: 0018:ffffae0ec2683ad8 EFLAGS: 00010246 > [ 14.834721] RAX: 0000000000000000 RBX: ffff951876a9f410 RCX: 1111111111111120 > [ 14.836287] RDX: 0000000000000004 RSI: 0000000000000006 RDI: ffff951876a9f410 > [ 14.837853] RBP: ffff951874f1f6c8 R08: 0000000373745034 R09: 0000000000000000 > [ 14.839244] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000840d > [ 14.840799] R13: ffff951876695000 R14: ffff951876a9f410 R15: 0000000000000001 > [ 14.842349] FS: 00007f39e17b5540(0000) GS:ffff95187d800000(0000) knlGS:0000000000000000 > [ 14.844125] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 14.845403] CR2: 00007f39e16ba4a0 CR3: 0000000075b9e006 CR4: 0000000000360ef0 > [ 14.847055] Call Trace: > [ 14.847628] __ext4_forget+0xf2/0x280 > [ 14.848470] ext4_free_blocks+0x9c8/0xc00 > [ 14.849270] ? __lock_acquire+0x447/0x7c0 > [ 14.850174] ? kvm_sched_clock_read+0x14/0x30 > [ 14.851182] ext4_remove_blocks+0x33c/0x630 > [ 14.852190] ext4_ext_rm_leaf+0x1fb/0x7a0 > [ 14.853493] ext4_ext_remove_space+0x556/0xa80 > [ 14.855020] ? ext4_es_remove_extent+0x9d/0x180 > [ 14.856325] ext4_truncate+0x413/0x520 > [ 14.857374] ext4_evict_inode+0x29c/0x670 > [ 14.858329] evict+0xd0/0x1a0 > [ 14.859157] ext4_xattr_inode_array_free+0x27/0x40 > [ 14.860341] ext4_evict_inode+0x31c/0x670 > [ 14.861344] evict+0xd0/0x1a0 > [ 14.862107] do_unlinkat+0x1cd/0x2e0 > [ 14.862769] do_syscall_64+0x50/0x1b0 > [ 14.863387] entry_SYSCALL_64_after_hwframe+0x49/0xbe > [ 14.864219] RIP: 0033:0x7f39e16deff7 > [ 14.864813] Code: 73 01 c3 48 8b 0d 99 ee 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 69 ee 0c 00 f7 d8 64 89 01 48 > [ 14.867949] RSP: 002b:00007fff3ed46068 EFLAGS: 00000246 ORIG_RAX: 0000000000000107 > [ 14.869197] RAX: ffffffffffffffda RBX: 0000561d094937b0 RCX: 00007f39e16deff7 > [ 14.870371] RDX: 0000000000000000 RSI: 0000561d09492340 RDI: 00000000ffffff9c > [ 14.871544] RBP: 0000561d094922b0 R08: 0000000000000003 R09: 0000000000000000 > [ 14.872766] R10: 0000000000000100 R11: 0000000000000246 R12: 00007fff3ed46250 > [ 14.873950] R13: 0000000000000000 R14: 0000561d094937b0 R15: 0000000000000000 > [ 14.875156] irq event stamp: 2176 > [ 14.875720] hardirqs last enabled at (2175): [<ffffffffb16663e1>] kmem_cache_free+0x51/0x220 > [ 14.877150] hardirqs last disabled at (2176): [<ffffffffb14016aa>] trace_hardirqs_off_thunk+0x1a/0x20 > [ 14.878702] softirqs last enabled at (814): [<ffffffffb14297f3>] fpu__clear+0xb3/0x1b0 > [ 14.880055] softirqs last disabled at (812): [<ffffffffb14297b5>] fpu__clear+0x75/0x1b0 > [ 14.881926] ---[ end trace 4d44757f1901181f ]--- > _check_dmesg: something found in dmesg (see /results/ext4/results-4k/ext4/026.dmesg) > [14:11:44] > > > generic/233 [14:18:34][ 19.736637] run fstests generic/233 at 2019-09-30 14:18:34 > [ 21.400934] EXT4-fs (vdc): Delayed block allocation failed for inode 131809 at logical offset 209 with max blocks 9 with error 122 > [ 21.404197] EXT4-fs (vdc): This should not happen!! Data will be lost > [ 21.404197] > [14:18:36] 2s
On Tue 01-10-19 09:59:08, Jan Kara wrote: > On Mon 30-09-19 17:21:45, Theodore Y. Ts'o wrote: > > On Mon, Sep 30, 2019 at 06:25:36PM +0200, Jan Kara wrote: > > > The problem was that my patches were based on a kernel that didn't have > > > this code yet. I've rebased now on current Linus' tree and fixed this up in > > > my local tree (along with couple documentation warnings). But I don't think > > > it's worth resending just for this. > > > > Oh, agreed, it's not worth resending for this; it was a quick fixup. > > > > How much testing have you given this patch series? I did a quick > > xfstests run, and I found the following new failures when this was > > applied on top of the dev branch on ext4.git (e.g., what got sent to > > Linus as a pull request). > > I did run e.g. ext4/4k, ext4/1k, ext4/nojournal, ext4/datajournal. But > my setup does not run ext4/026 (too old e2fsprogs it seems - I need to > update those). I have cathegorized generic/233 as preexisting failure but I > might be wrong and it definitely failed differently for me. Anyway, thanks > for running these tests, I'll check more what's going on. OK, so I've fixed ext4/026 and generic/233 failures - those were really bugs I've introduced. The failure I've seen with generic/233 was different than what you've shown so I'm not 100% sure the problem will be really fixed for you. We'll see. The ext4/301 in nojournal mode is a preexisting failure for me. I'm getting EBUSY from ext4_move_extents() because page buffers cannot be occasionally invalidated. Looking at the code that indeed looks possible given the workload (pages can be written out while ext4_move_extents() runs). I'm not yet sure about some failures in ext4/adv and ext4/bigalloc configs. Where can I find what mkfs & mount options do you use for these? I've looked at xfstests-bld but I didn't find the configs there... Thanks! Honza > > ext4/4k: > > Failures: ext4/026 generic/233 > > ext4/1k: > > Failures: ext4/026 > > ext4/ext3: > > Failures: ext4/026 generic/233 > > ext4/encrypt: > > Failures: generic/083 > > ext4/nojournal: > > Failures: ext4/301 > > ext4/adv: > > Failures: ext4/026 generic/233 generic/269 generic/270 generic/476 > > ext4/dioread_nolock: > > Failures: ext4/026 generic/233 > > ext4/data_journal: > > Failures: generic/233 > > ext4/bigalloc: > > Failures: generic/013 generic/014 generic/051 generic/083 > > generic/232 generic/233 generic/269 generic/270 generic/299 > > generic/429 generic/475 generic/476 > > ext4/bigalloc_1k: > > Failures: ext4/026 generic/013 generic/014 generic/032 generic/051 > > generic/068 generic/083 generic/232 generic/233 generic/269 > > generic/270 generic/320 generic/475 generic/476 > > > > I haven't trianged them all yet, but here are the details for the two > > biggies: ext4/026 and generic/233. > > > > - Ted > > > > ext4/026 [14:11:43][ 14.287850] run fstests ext4/026 at 2019-09-30 14:11:43 > > [ 14.821933] WARNING: CPU: 0 PID: 1542 at fs/jbd2/revoke.c:394 jbd2_journal_revoke+0x14b/0x160 > > [ 14.824000] CPU: 0 PID: 1542 Comm: rm Not tainted 5.3.0-rc4-xfstests-00019-ga8d18e88fd60-dirty #1201 > > [ 14.826111] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 > > [ 14.828039] RIP: 0010:jbd2_journal_revoke+0x14b/0x160 > > [ 14.829217] Code: 4c 89 f7 e8 77 8c ef ff eb a6 e8 d0 8d ef ff 48 85 c0 49 89 c6 74 99 48 8b 00 a9 00 00 10 00 0f 84 5b ff ff ff e9 71 06 00 00 <0f> 0b eb 89 0f 0b 0f 0b 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f > > [ 14.833505] RSP: 0018:ffffae0ec2683ad8 EFLAGS: 00010246 > > [ 14.834721] RAX: 0000000000000000 RBX: ffff951876a9f410 RCX: 1111111111111120 > > [ 14.836287] RDX: 0000000000000004 RSI: 0000000000000006 RDI: ffff951876a9f410 > > [ 14.837853] RBP: ffff951874f1f6c8 R08: 0000000373745034 R09: 0000000000000000 > > [ 14.839244] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000840d > > [ 14.840799] R13: ffff951876695000 R14: ffff951876a9f410 R15: 0000000000000001 > > [ 14.842349] FS: 00007f39e17b5540(0000) GS:ffff95187d800000(0000) knlGS:0000000000000000 > > [ 14.844125] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > [ 14.845403] CR2: 00007f39e16ba4a0 CR3: 0000000075b9e006 CR4: 0000000000360ef0 > > [ 14.847055] Call Trace: > > [ 14.847628] __ext4_forget+0xf2/0x280 > > [ 14.848470] ext4_free_blocks+0x9c8/0xc00 > > [ 14.849270] ? __lock_acquire+0x447/0x7c0 > > [ 14.850174] ? kvm_sched_clock_read+0x14/0x30 > > [ 14.851182] ext4_remove_blocks+0x33c/0x630 > > [ 14.852190] ext4_ext_rm_leaf+0x1fb/0x7a0 > > [ 14.853493] ext4_ext_remove_space+0x556/0xa80 > > [ 14.855020] ? ext4_es_remove_extent+0x9d/0x180 > > [ 14.856325] ext4_truncate+0x413/0x520 > > [ 14.857374] ext4_evict_inode+0x29c/0x670 > > [ 14.858329] evict+0xd0/0x1a0 > > [ 14.859157] ext4_xattr_inode_array_free+0x27/0x40 > > [ 14.860341] ext4_evict_inode+0x31c/0x670 > > [ 14.861344] evict+0xd0/0x1a0 > > [ 14.862107] do_unlinkat+0x1cd/0x2e0 > > [ 14.862769] do_syscall_64+0x50/0x1b0 > > [ 14.863387] entry_SYSCALL_64_after_hwframe+0x49/0xbe > > [ 14.864219] RIP: 0033:0x7f39e16deff7 > > [ 14.864813] Code: 73 01 c3 48 8b 0d 99 ee 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 69 ee 0c 00 f7 d8 64 89 01 48 > > [ 14.867949] RSP: 002b:00007fff3ed46068 EFLAGS: 00000246 ORIG_RAX: 0000000000000107 > > [ 14.869197] RAX: ffffffffffffffda RBX: 0000561d094937b0 RCX: 00007f39e16deff7 > > [ 14.870371] RDX: 0000000000000000 RSI: 0000561d09492340 RDI: 00000000ffffff9c > > [ 14.871544] RBP: 0000561d094922b0 R08: 0000000000000003 R09: 0000000000000000 > > [ 14.872766] R10: 0000000000000100 R11: 0000000000000246 R12: 00007fff3ed46250 > > [ 14.873950] R13: 0000000000000000 R14: 0000561d094937b0 R15: 0000000000000000 > > [ 14.875156] irq event stamp: 2176 > > [ 14.875720] hardirqs last enabled at (2175): [<ffffffffb16663e1>] kmem_cache_free+0x51/0x220 > > [ 14.877150] hardirqs last disabled at (2176): [<ffffffffb14016aa>] trace_hardirqs_off_thunk+0x1a/0x20 > > [ 14.878702] softirqs last enabled at (814): [<ffffffffb14297f3>] fpu__clear+0xb3/0x1b0 > > [ 14.880055] softirqs last disabled at (812): [<ffffffffb14297b5>] fpu__clear+0x75/0x1b0 > > [ 14.881926] ---[ end trace 4d44757f1901181f ]--- > > _check_dmesg: something found in dmesg (see /results/ext4/results-4k/ext4/026.dmesg) > > [14:11:44] > > > > > > generic/233 [14:18:34][ 19.736637] run fstests generic/233 at 2019-09-30 14:18:34 > > [ 21.400934] EXT4-fs (vdc): Delayed block allocation failed for inode 131809 at logical offset 209 with max blocks 9 with error 122 > > [ 21.404197] EXT4-fs (vdc): This should not happen!! Data will be lost > > [ 21.404197] > > [14:18:36] 2s > -- > Jan Kara <jack@suse.com> > SUSE Labs, CR
On Thu, Oct 03, 2019 at 10:33:16AM +0200, Jan Kara wrote: > > I'm not yet sure about some failures in ext4/adv and ext4/bigalloc configs. > Where can I find what mkfs & mount options do you use for these? I've > looked at xfstests-bld but I didn't find the configs there... Thanks! The configs are in [1] the mount options for adv and bigalloc are in [2] and [3], respectively. [1] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/files/root/fs [2] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/adv [3] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/bigalloc It shouldn't be terribly difficult for you to use kvm-xfstests on SuSE, if you just want to try using the test appliance directly. I'm happy to update the documentation to include the necessary SuSE packages needed to run kvm-xfstests; it shouldn't be that hard to translate them from the Debian prerequisites to SuSE package names. See [4] for details. [4] https://github.com/tytso/xfstests-bld/blob/master/Documentation/kvm-quickstart.md Note: if you want to run tests manually (which can be handy if you want to try tweaking the tests, just do this: % kvm-xfstests shell ... root@kvm-xfstests:~# FSTESTSET=ext4/301 root@kvm-xfstests:~# FSTESTCFG=adv root@kvm-xfstests:~# ./runtests.sh The xfstests installation is in /root/xfstests. Other valid settings for FSTESTCFG include: ext4/adv, ext4/all, btrfs/default, btrfs, xfs, nfs, nfs/loopback_v3, and so on. See [1] for other fs configs that you can use for testing. Cheers, - Ted
On Thu 03-10-19 09:29:09, Theodore Y. Ts'o wrote: > On Thu, Oct 03, 2019 at 10:33:16AM +0200, Jan Kara wrote: > > > > I'm not yet sure about some failures in ext4/adv and ext4/bigalloc configs. > > Where can I find what mkfs & mount options do you use for these? I've > > looked at xfstests-bld but I didn't find the configs there... Thanks! > > The configs are in [1] the mount options for adv and bigalloc are in > [2] and [3], respectively. > > [1] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/files/root/fs > [2] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/adv > [3] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/bigalloc Thanks. Somehow I didn't see them. > It shouldn't be terribly difficult for you to use kvm-xfstests on > SuSE, if you just want to try using the test appliance directly. I'm > happy to update the documentation to include the necessary SuSE > packages needed to run kvm-xfstests; it shouldn't be that hard to > translate them from the Debian prerequisites to SuSE package names. > See [4] for details. > > [4] https://github.com/tytso/xfstests-bld/blob/master/Documentation/kvm-quickstart.md Yeah, I guess I should do that. The only problem with this is that I have my own VM setup I use for xfstests runs (and other kernel debugging) and it just works good enough that switching to using kvm-xfstests never gets high enough on my todo list :). I'll give it more priority... Honza > Note: if you want to run tests manually (which can be handy if you > want to try tweaking the tests, just do this: > > % kvm-xfstests shell > ... > root@kvm-xfstests:~# FSTESTSET=ext4/301 > root@kvm-xfstests:~# FSTESTCFG=adv > root@kvm-xfstests:~# ./runtests.sh > > The xfstests installation is in /root/xfstests. Other valid settings > for FSTESTCFG include: ext4/adv, ext4/all, btrfs/default, btrfs, xfs, > nfs, nfs/loopback_v3, and so on. See [1] for other fs configs that > you can use for testing. > > Cheers, > > - Ted
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index edfbfd7d6ff2..df92bc257f85 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -312,12 +312,12 @@ static int start_this_handle(journal_t *journal, handle_t *handle, gfp_t gfp_mask) { transaction_t *transaction, *new_transaction = NULL; - int blocks = handle->h_buffer_credits; + int blocks = handle->h_total_credits; int rsv_blocks = 0; unsigned long ts = jiffies; if (handle->h_rsv_handle) - rsv_blocks = handle->h_rsv_handle->h_buffer_credits; + rsv_blocks = handle->h_rsv_handle->h_total_credits; /* * Limit the number of reserved credits to 1/2 of maximum transaction @@ -445,7 +445,7 @@ static handle_t *new_handle(int nblocks) handle_t *handle = jbd2_alloc_handle(GFP_NOFS); if (!handle) return NULL; - handle->h_buffer_credits = nblocks; + handle->h_total_credits = nblocks; handle->h_ref = 1; return handle; @@ -534,7 +534,7 @@ static void __jbd2_journal_unreserve_handle(handle_t *handle) journal_t *journal = handle->h_journal; WARN_ON(!handle->h_reserved); - sub_reserved_credits(journal, handle->h_buffer_credits); + sub_reserved_credits(journal, handle->h_total_credits); } void jbd2_journal_free_reserved(handle_t *handle) @@ -657,10 +657,10 @@ int jbd2_journal_extend(handle_t *handle, int nblocks, int revoke_records) trace_jbd2_handle_extend(journal->j_fs_dev->bd_dev, transaction->t_tid, handle->h_type, handle->h_line_no, - handle->h_buffer_credits, + handle->h_total_credits, nblocks); - handle->h_buffer_credits += nblocks; + handle->h_total_credits += nblocks; handle->h_requested_credits += nblocks; handle->h_revoke_credits += revoke_records; handle->h_revoke_credits_requested += revoke_records; @@ -687,9 +687,9 @@ static void stop_this_handle(handle_t *handle) revoke_descriptors = DIV_ROUND_UP( handle->h_revoke_credits_requested - handle->h_revoke_credits, journal->j_revoke_records_per_block); - WARN_ON_ONCE(revoke_descriptors > handle->h_buffer_credits); - handle->h_buffer_credits -= revoke_descriptors; - atomic_sub(handle->h_buffer_credits, + WARN_ON_ONCE(revoke_descriptors > handle->h_total_credits); + handle->h_total_credits -= revoke_descriptors; + atomic_sub(handle->h_total_credits, &transaction->t_outstanding_credits); if (handle->h_rsv_handle) __jbd2_journal_unreserve_handle(handle->h_rsv_handle); @@ -748,7 +748,7 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, int revoke_records, read_unlock(&journal->j_state_lock); if (need_to_start) jbd2_log_start_commit(journal, tid); - handle->h_buffer_credits = nblocks + + handle->h_total_credits = nblocks + DIV_ROUND_UP(revoke_records, journal->j_revoke_records_per_block); handle->h_revoke_credits = revoke_records; @@ -1453,12 +1453,12 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh) * of the transaction. This needs to be done * once a transaction -bzzz */ - if (handle->h_buffer_credits <= 0) { + if (handle->h_total_credits <= 0) { ret = -ENOSPC; goto out_unlock_bh; } jh->b_modified = 1; - handle->h_buffer_credits--; + handle->h_total_credits--; } /* @@ -1702,7 +1702,7 @@ int jbd2_journal_forget (handle_t *handle, struct buffer_head *bh) drop: if (drop_reserve) { /* no need to reserve log space for this block -bzzz */ - handle->h_buffer_credits++; + handle->h_total_credits++; } return err; @@ -1763,7 +1763,7 @@ int jbd2_journal_stop(handle_t *handle) jiffies - handle->h_start_jiffies, handle->h_sync, handle->h_requested_credits, (handle->h_requested_credits - - handle->h_buffer_credits)); + handle->h_total_credits)); /* * Implement synchronous transaction batching. If the handle diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 145a229c1095..00fc6b86caa3 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -477,7 +477,8 @@ struct jbd2_revoke_table_s; * @h_transaction: Which compound transaction is this update a part of? * @h_journal: Which journal handle belongs to - used iff h_reserved set. * @h_rsv_handle: Handle reserved for finishing the logical operation. - * @h_buffer_credits: Number of remaining buffers we are allowed to dirty. + * @h_total_credits: Number of remaining buffers we are allowed to add to + journal. These are dirty buffers and revoke descriptor blocks. * @h_revoke_credits: Number of remaining revoke records available for handle * @h_ref: Reference count on this handle. * @h_err: Field for caller's use to track errors through large fs operations. @@ -488,7 +489,7 @@ struct jbd2_revoke_table_s; * @h_type: For handle statistics. * @h_line_no: For handle statistics. * @h_start_jiffies: Handle Start time. - * @h_requested_credits: Holds @h_buffer_credits after handle is started. + * @h_requested_credits: Holds @h_total_credits after handle is started. * @saved_alloc_context: Saved context while transaction is open. **/ @@ -505,7 +506,7 @@ struct jbd2_journal_handle }; handle_t *h_rsv_handle; - int h_buffer_credits; + int h_total_credits; int h_revoke_credits; int h_revoke_credits_requested; int h_ref; @@ -1645,7 +1646,7 @@ static inline int jbd2_handle_buffer_credits(handle_t *handle) { journal_t *journal = handle->h_transaction->t_journal; - return handle->h_buffer_credits - + return handle->h_total_credits - DIV_ROUND_UP(handle->h_revoke_credits_requested, journal->j_revoke_records_per_block); }
The credit counter now contains both buffer and revoke descriptor block credits. Rename to counter to h_total_credits to reflect that. No functional change. Signed-off-by: Jan Kara <jack@suse.cz> --- fs/jbd2/transaction.c | 28 ++++++++++++++-------------- include/linux/jbd2.h | 9 +++++---- 2 files changed, 19 insertions(+), 18 deletions(-)