Chao Yu
894b7c6584
f2fs: fix to skip GC if type in SSA and SIT is inconsistent
[ Upstream commit 10d255c3540239c7920f52d2eb223756e186af56 ]
If segment type in SSA and SIT is inconsistent, we will encounter below
BUG_ON during GC, to avoid this panic, let's just skip doing GC on such
segment.
The bug is triggered with image reported in below link:
https://bugzilla.kernel.org/show_bug.cgi?id=200223
[ 388.060262] ------------[ cut here ]------------
[ 388.060268] kernel BUG at /home/y00370721/git/devf2fs/gc.c:989!
[ 388.061172] invalid opcode: 0000 [#1] SMP
[ 388.061773] Modules linked in: f2fs(O) bluetooth ecdh_generic xt_tcpudp iptable_filter ip_tables x_tables lp ttm drm_kms_helper drm intel_rapl sb_edac crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel fb_sys_fops ppdev aes_x86_64 syscopyarea crypto_simd sysfillrect parport_pc joydev sysimgblt glue_helper parport cryptd i2c_piix4 serio_raw mac_hid btrfs hid_generic usbhid hid raid6_pq psmouse pata_acpi floppy
[ 388.064247] CPU: 7 PID: 4151 Comm: f2fs_gc-7:0 Tainted: G O 4.13.0-rc1+ #26
[ 388.065306] Hardware name: Xen HVM domU, BIOS 4.1.2_115-900.260_ 11/06/2015
[ 388.066058] task: ffff880201583b80 task.stack: ffffc90004d7c000
[ 388.069948] RIP: 0010:do_garbage_collect+0xcc8/0xcd0 [f2fs]
[ 388.070766] RSP: 0018:ffffc90004d7fc68 EFLAGS: 00010202
[ 388.071783] RAX: ffff8801ed227000 RBX: 0000000000000001 RCX: ffffea0007b489c0
[ 388.072700] RDX: ffff880000000000 RSI: 0000000000000001 RDI: ffffea0007b489c0
[ 388.073607] RBP: ffffc90004d7fd58 R08: 0000000000000003 R09: ffffea0007b489dc
[ 388.074619] R10: 0000000000000000 R11: 0052782ab317138d R12: 0000000000000018
[ 388.075625] R13: 0000000000000018 R14: ffff880211ceb000 R15: ffff880211ceb000
[ 388.076687] FS: 0000000000000000(0000) GS:ffff880214fc0000(0000) knlGS:0000000000000000
[ 388.083277] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 388.084536] CR2: 0000000000e18c60 CR3: 00000001ecf2e000 CR4: 00000000001406e0
[ 388.085748] Call Trace:
[ 388.086690] ? find_next_bit+0xb/0x10
[ 388.088091] f2fs_gc+0x1a8/0x9d0 [f2fs]
[ 388.088888] ? lock_timer_base+0x7d/0xa0
[ 388.090213] ? try_to_del_timer_sync+0x44/0x60
[ 388.091698] gc_thread_func+0x342/0x4b0 [f2fs]
[ 388.092892] ? wait_woken+0x80/0x80
[ 388.094098] kthread+0x109/0x140
[ 388.095010] ? f2fs_gc+0x9d0/0x9d0 [f2fs]
[ 388.096043] ? kthread_park+0x60/0x60
[ 388.097281] ret_from_fork+0x25/0x30
[ 388.098401] Code: ff ff 48 83 e8 01 48 89 44 24 58 e9 27 f8 ff ff 48 83 e8 01 e9 78 fc ff ff 48 8d 78 ff e9 17 fb ff ff 48 83 ef 01 e9 4d f4 ff ff <0f> 0b 66 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 41 56 41 55
[ 388.100864] RIP: do_garbage_collect+0xcc8/0xcd0 [f2fs] RSP: ffffc90004d7fc68
[ 388.101810] ---[ end trace 81c73d6e6b7da61d ]---
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-19 22:43:43 +02:00
..
2018-09-09 19:55:55 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:51:47 +02:00
2018-07-08 15:30:51 +02:00
2018-07-22 14:28:49 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-19 22:43:36 +02:00
2018-09-05 09:26:29 +02:00
2018-08-24 13:09:07 +02:00
2018-09-19 22:43:36 +02:00
2017-11-24 08:37:05 +01:00
2017-11-02 11:10:55 +01:00
2018-08-03 07:50:32 +02:00
2018-07-17 11:39:26 +02:00
2017-11-02 11:10:55 +01:00
2018-06-21 04:02:42 +09:00
2017-11-02 11:10:55 +01:00
2018-07-11 16:29:22 +02:00
2018-09-05 09:26:36 +02:00
2018-09-19 22:43:43 +02:00
2018-09-15 09:45:27 +02:00
2018-09-05 09:26:29 +02:00
2018-09-05 09:26:38 +02:00
2018-05-30 07:52:35 +02:00
2018-09-15 09:45:26 +02:00
2018-09-15 09:45:27 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-19 08:56:21 +02:00
2018-06-21 04:02:41 +09:00
2018-07-11 16:29:16 +02:00
2018-05-30 07:51:47 +02:00
2018-08-09 12:16:39 +02:00
2018-02-16 20:22:59 +01:00
2018-02-03 17:39:08 +01:00
2017-11-02 11:10:55 +01:00
2018-03-28 18:24:43 +02:00
2018-09-19 22:43:40 +02:00
2018-02-03 17:39:08 +01:00
2018-08-03 07:50:22 +02:00
2018-05-30 07:51:47 +02:00
2017-11-02 11:10:55 +01:00
2018-06-21 04:02:41 +09:00
2017-11-02 11:10:55 +01:00
2018-07-22 14:28:42 +02:00
2017-11-02 11:10:55 +01:00
2018-06-26 08:06:33 +08:00
2018-09-09 19:55:58 +02:00
2018-09-15 09:45:27 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-09 19:56:02 +02:00
2018-09-15 09:45:27 +02:00
2017-11-02 11:10:55 +01:00
2018-09-05 09:26:32 +02:00
2018-09-05 09:26:41 +02:00
2017-11-02 11:10:55 +01:00
2018-09-09 19:56:00 +02:00
2018-07-03 11:25:03 +02:00
2018-05-30 07:51:47 +02:00
2018-08-09 12:16:39 +02:00
2018-06-05 11:41:54 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-14 18:13:32 -07:00
2018-07-17 11:39:29 +02:00
2017-11-02 11:10:55 +01:00
2018-06-26 08:06:33 +08:00
2017-10-03 17:54:25 -07:00
2018-08-03 07:50:42 +02:00
2017-11-30 08:40:45 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-26 11:02:14 +02:00
2018-09-15 09:45:28 +02:00
2018-03-08 22:41:06 -08:00
2017-11-02 11:10:55 +01:00
2018-03-03 10:24:21 +01:00
2017-12-17 15:07:59 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:25 +02:00
2018-07-17 11:39:27 +02:00
2017-09-13 09:11:44 -07:00
2017-11-02 11:10:55 +01:00
2017-10-16 12:11:56 -07:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:25 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-19 08:56:19 +02:00
2018-08-15 18:12:48 +02:00
2017-11-02 11:10:55 +01:00
2018-02-16 20:23:05 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:28 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:51:47 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-08-06 16:20:49 +02:00
2017-11-02 11:10:55 +01:00
2018-09-09 19:56:01 +02:00