Files
mirror_zfs/include/sys
Tim Chase 3937ab20f3 Allow for lock-free reading zfsdev_state_list.
Restructure the zfsdev_state_list to allow for lock-free reading by
converting to a simple singly-linked list from which items are never
deleted and over which only forward iterations are performed.  It depends
on, among other things, the atomicity of accessing the zs_minor integer
and zs_next pointer.

This fixes a lock inversion in which the zfsdev_state_lock is used by
both the sync task (txg_sync) and indirectly by any user program which
uses /dev/zfs; the zfsdev_release method uses the same lock and then
blocks on the sync task.

The most typical failure scenerio occurs when the sync task is cleaning
up a user hold while various concurrent "zfs" commands are in progress.

Neither Illumos nor Solaris are affected by this issue because they use
DDI interface which provides lock-free reading of device state via the
ddi_get_soft_state() function.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2301
2014-05-19 11:45:11 -07:00
..
2014-04-02 13:10:08 -07:00
2014-02-21 16:10:49 -08:00
2013-01-08 10:35:43 -08:00
2013-01-08 10:35:35 -08:00
2014-01-07 10:33:11 -08:00
2013-11-05 12:15:00 -08:00
2013-11-04 11:27:41 -08:00
2013-11-05 12:15:00 -08:00
2014-03-04 12:22:24 -08:00
2013-12-10 10:09:27 -08:00
2013-11-05 12:23:35 -08:00
2013-11-05 12:23:11 -08:00
2013-09-04 15:49:00 -07:00
2013-11-04 11:18:14 -08:00
2013-09-04 16:01:24 -07:00
2014-02-21 12:10:40 -08:00
2013-09-04 16:01:24 -07:00
2013-11-04 11:17:48 -08:00
2013-11-05 12:25:01 -08:00
2013-09-04 16:01:24 -07:00
2013-09-04 16:01:24 -07:00
2013-09-04 16:01:24 -07:00
2013-09-04 16:01:24 -07:00
2012-03-07 16:28:00 -08:00
2014-02-21 12:10:40 -08:00
2013-11-04 10:55:25 -08:00
2011-02-10 09:21:43 -08:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2013-05-01 17:05:52 -07:00
2011-03-02 11:43:50 -08:00
2013-11-04 10:55:25 -08:00
2013-11-04 10:55:25 -08:00
2013-09-04 16:01:24 -07:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2013-12-18 16:46:35 -08:00
2011-02-10 09:27:21 -08:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2014-01-29 15:50:44 -08:00
2013-08-15 16:19:07 -07:00
2013-12-18 16:46:35 -08:00
2013-12-18 16:46:35 -08:00
2013-11-04 10:55:25 -08:00
2013-11-05 12:14:56 -08:00
2014-02-21 12:10:39 -08:00
2013-12-18 16:46:35 -08:00
2013-12-16 09:15:57 -08:00