mirror_zfs/lib
John Gallagher d12614521a Fixes for procfs files backed by linked lists
There are some issues with the way the seq_file interface is implemented
for kstats backed by linked lists (zfs_dbgmsgs and certain per-pool
debugging info):

* We don't account for the fact that seq_file sometimes visits a node
  multiple times, which results in missing messages when read through
  procfs.
* We don't keep separate state for each reader of a file, so concurrent
  readers will receive incorrect results.
* We don't account for the fact that entries may have been removed from
  the list between read syscalls, so reading from these files in procfs
  can cause the system to crash.

This change fixes these issues and adds procfs_list, a wrapper around a
linked list which abstracts away the details of implementing the
seq_file interface for a list and exposing the contents of the list
through procfs.

Reviewed by: Don Brady <don.brady@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: John Gallagher <john.gallagher@delphix.com>
External-issue: LX-1211
Closes #7819
2018-09-26 11:08:12 -07:00
..
libavl Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libefi Remove libefi __linux__ wrappers 2018-06-14 09:43:32 -07:00
libicp Add support for selecting encryption backend 2018-08-02 11:59:24 -07:00
libnvpair OpenZFS 9580 - Add a hash-table on top of nvlist to speed-up operations 2018-07-30 11:30:03 -07:00
libshare Fedora 28: Fix misc bounds check compiler warnings 2018-08-26 12:55:44 -07:00
libspl Fix kernel unaligned access on sparc64 2018-07-11 13:10:40 -07:00
libtpool Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libunicode Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libuutil Update build system and packaging 2018-05-29 16:00:33 -07:00
libzfs Pool allocation classes 2018-09-05 18:33:36 -07:00
libzfs_core Add basic zfs ioc input nvpair validation 2018-09-02 12:14:01 -07:00
libzpool Fixes for procfs files backed by linked lists 2018-09-26 11:08:12 -07:00
Makefile.am Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00