Tom Caputi
e7a2fa70c3
Fix deadlock in 'zfs rollback'
...
Currently, the 'zfs rollback' code can end up deadlocked due to
the way the kernel handles unreferenced inodes on a suspended fs.
Essentially, the zfs_resume_fs() code path may cause zfs to spawn
new threads as it reinstantiates the suspended fs's zil. When a
new thread is spawned, the kernel may attempt to free memory for
that thread by freeing some unreferenced inodes. If it happens to
select inodes that are a a part of the suspended fs a deadlock
will occur because freeing inodes requires holding the fs's
z_teardown_inactive_lock which is still held from the suspend.
This patch corrects this issue by adding an additional reference
to all inodes that are still present when a suspend is initiated.
This prevents them from being freed by the kernel for any reason.
Reviewed-by: Alek Pinchuk <apinchuk@datto.com >
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov >
Signed-off-by: Tom Caputi <tcaputi@datto.com >
Closes #9203
2019-08-27 09:55:51 -07:00
..
2019-08-21 09:29:23 -07:00
2018-10-19 12:08:03 -07:00
2019-08-16 09:08:21 -06:00
2017-11-04 13:25:13 -07:00
2019-07-26 10:54:14 -07:00
2019-07-26 10:54:14 -07:00
2019-06-19 09:48:12 -07:00
2019-06-19 09:48:12 -07:00
2018-06-06 09:35:59 -07:00
2019-02-12 10:41:15 -08:00
2018-10-01 10:42:05 -07:00
2019-08-15 17:53:53 -06:00
2019-06-12 13:13:09 -07:00
2019-06-19 14:54:02 -07:00
2019-06-19 09:48:12 -07:00
2019-05-07 15:18:44 -07:00
2019-08-15 17:53:53 -06:00
2019-06-20 12:29:51 -07:00
2019-06-19 09:48:12 -07:00
2019-06-19 09:48:12 -07:00
2019-06-19 09:48:12 -07:00
2019-07-30 09:18:30 -07:00
2019-07-25 11:57:58 -07:00
2019-08-15 17:53:53 -06:00
2019-07-08 13:18:50 -07:00
2019-08-15 08:44:57 -06:00
2019-06-19 09:48:12 -07:00
2019-07-05 16:53:14 -07:00
2019-08-13 21:16:23 -06:00
2019-08-20 11:34:52 -07:00
2018-05-29 16:00:33 -07:00
2019-08-20 11:34:52 -07:00
2019-07-26 10:54:14 -07:00
2019-08-15 17:53:53 -06:00
2018-05-29 16:00:33 -07:00
2019-07-26 10:54:14 -07:00
2019-06-22 16:51:46 -07:00
2019-02-15 12:41:38 -08:00
2016-11-29 14:34:27 -08:00
2019-08-05 11:35:47 -07:00
2018-05-29 16:00:33 -07:00
2017-10-11 16:54:48 -04:00
2019-05-02 16:46:04 -07:00
2015-01-16 14:41:26 -08:00
2019-07-16 10:11:49 -07:00
2019-08-16 09:08:21 -06:00
2019-03-21 12:47:57 -07:00
2019-06-25 12:03:38 -07:00
2019-06-19 09:48:12 -07:00
2019-07-15 13:57:56 -07:00
2019-07-26 13:52:30 -07:00
2019-04-16 12:38:36 -07:00
2019-04-16 12:38:36 -07:00
2019-04-16 12:38:36 -07:00
2019-04-16 12:38:36 -07:00
2019-08-05 14:34:27 -07:00
2019-08-13 21:24:43 -06:00
2019-07-08 11:20:53 -07:00
2019-08-19 16:04:26 -07:00
2018-03-15 10:53:58 -07:00
2016-11-29 14:34:27 -08:00
2010-08-31 13:41:58 -07:00
2019-02-12 10:38:11 -08:00
2019-05-29 16:18:14 -07:00
2018-05-29 16:00:33 -07:00
2019-07-26 10:54:14 -07:00
2019-08-16 09:08:21 -06:00
2019-08-13 21:24:43 -06:00
2019-04-04 18:57:06 -07:00
2019-08-16 09:08:21 -06:00
2019-07-16 10:11:49 -07:00
2018-04-14 12:16:17 -07:00
2018-06-06 09:35:59 -07:00
2018-06-06 09:35:59 -07:00
2019-07-08 11:20:53 -07:00
2019-07-16 10:11:49 -07:00
2019-03-21 12:47:57 -07:00
2016-08-31 14:35:34 -07:00
2018-05-29 16:00:33 -07:00
2019-07-05 20:38:56 -07:00
2019-06-20 18:29:02 -07:00
2019-07-10 15:54:49 -07:00
2019-02-12 10:38:11 -08:00
2019-07-16 10:11:49 -07:00
2019-08-16 09:08:21 -06:00
2019-06-13 13:12:39 -07:00
2019-06-20 18:29:02 -07:00
2019-06-20 18:29:02 -07:00
2019-06-13 13:08:24 -07:00
2019-05-08 10:18:40 -07:00
2019-07-12 09:31:20 -07:00
2019-07-12 09:31:20 -07:00
2019-07-12 09:31:20 -07:00
2019-07-12 09:31:20 -07:00
2019-07-12 09:31:20 -07:00
2017-01-22 13:25:40 -08:00
2019-08-21 09:29:23 -07:00
2019-07-12 09:31:20 -07:00
2019-07-12 09:31:20 -07:00
2019-07-12 09:31:20 -07:00
2019-06-20 18:29:02 -07:00
2019-07-16 10:11:49 -07:00
2019-06-20 18:29:02 -07:00
2019-08-16 09:08:21 -06:00
2019-08-16 09:08:21 -06:00
2019-01-18 09:58:46 -08:00
2019-06-12 13:13:09 -07:00
2019-06-12 13:13:09 -07:00
2019-07-16 14:14:12 -07:00
2018-02-08 15:29:24 -08:00
2019-08-12 10:02:34 -07:00
2018-06-26 10:07:42 -07:00
2019-06-22 16:51:46 -07:00
2019-04-16 10:01:51 -07:00
2018-05-29 16:00:33 -07:00
2018-05-29 16:00:33 -07:00
2019-08-13 07:58:02 -06:00
2019-04-04 18:57:06 -07:00
2019-02-12 10:41:15 -08:00
2018-11-08 16:47:24 -08:00
2018-05-29 16:00:33 -07:00
2019-07-25 11:59:20 -07:00
2019-08-15 17:36:24 -06:00
2018-05-29 16:00:33 -07:00
2018-03-04 17:34:51 -08:00
2019-04-25 10:17:27 -07:00
2018-10-11 10:19:33 -07:00
2018-02-13 14:54:54 -08:00
2019-06-20 18:31:52 -07:00
2019-08-27 09:55:51 -07:00
2019-08-13 21:21:27 -06:00
2019-08-27 09:55:51 -07:00
2019-08-13 21:21:27 -06:00
2017-11-04 13:25:13 -07:00
2018-08-29 11:33:33 -07:00
2019-04-10 15:39:40 -07:00
2019-03-15 14:14:31 -07:00
2019-08-13 21:24:43 -06:00
2018-02-09 10:08:05 -08:00
2018-05-02 15:01:24 -07:00
2016-12-12 10:46:26 -08:00
2019-05-08 10:04:04 -07:00
2019-05-08 10:04:04 -07:00
2018-09-24 17:11:25 -07:00
2019-07-15 16:26:52 -07:00
2018-05-29 16:00:33 -07:00
2019-07-26 10:54:14 -07:00
2019-06-21 09:40:56 -07:00