diff options
author | Brian Behlendorf <[email protected]> | 2013-07-15 13:37:51 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-07-17 09:28:06 -0700 |
commit | dba1d705669cf0e33091622d0e950b9459b20e2e (patch) | |
tree | d2d4bc38cf534c04dc38ea1e8cc292d22fdb825d /config/kernel.m4 | |
parent | c9ada6d5a00ba66fd54d62b4a1684e561fe2c9a4 (diff) |
Fix arc_adapt() spinning in iterate_supers_type()
The iterate_supers_type() function which was introduced in the
3.0 kernel was supposed to provide a safe way to call an arbitrary
function on all super blocks of a specific type. Unfortunately,
because a list_head was used a bug was introduced which made it
possible for iterate_supers_type() to get stuck spinning on a
super block which was just deactivated.
This can occur because when the list head is removed from the
fs_supers list it is reinitialized to point to itself. If the
iterate_supers_type() function happened to be processing the
removed list_head it will get stuck spinning on that list_head.
The bug was fixed in the 3.3 kernel by converting the list_head
to an hlist_node. However, to resolve the issue for existing
3.0 - 3.2 kernels we detect when a list_head is used. Then to
prevent the spinning from occurring the .next pointer is set to
the fs_supers list_head which ensures the iterate_supers_type()
function will always terminate.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1045
Closes #861
Closes #790
Diffstat (limited to 'config/kernel.m4')
-rw-r--r-- | config/kernel.m4 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4 index 46c0255b0..8742bc51f 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -72,6 +72,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_CALLBACK_SECURITY_INODE_INIT_SECURITY ZFS_AC_KERNEL_MOUNT_NODEV ZFS_AC_KERNEL_SHRINK + ZFS_AC_KERNEL_S_INSTANCES_LIST_HEAD ZFS_AC_KERNEL_S_D_OP ZFS_AC_KERNEL_BDI ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER |