libzfs should be decoupled from kernel's zfs_context.h
Currently, the build for libzfs uses the kernel's zfs_context.h (pulled in via spa.h). This complicates making changes to other ZFS header files that are compatible for compilation in both libzfs and the kernel.
The best approach to resolve this problem would be to better separate data structures and APIs that are shared between userland and the kernel from those that are kernel only. However, the use of recursive includes and the previous mixing of things like on-disk data structures and kernel APIs makes this a complicated and invasive change.
What is proposed here is to break the dependency by adding a custom zfs_context.h for libzfs as is already the case for libzpool.
Updated by Electric Monk almost 7 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 587644a8567e6a9533f88401daa59cbd78c4632f Author: Justin T. Gibbs <firstname.lastname@example.org> Date: 2014-11-23T03:11:13.000Z 5312 libzfs should be decoupled from kernel's zfs_context.h Reviewed by: Matthew Ahrens <email@example.com> Reviewed by: Will Andrews <firstname.lastname@example.org> Reviewed by: Andriy Gapon <avg@FreeBSD.org> Approved by: Dan McDonald <email@example.com>