Project

General

Profile

Bug #5312

libzfs should be decoupled from kernel's zfs_context.h

Added by Justin Gibbs almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Start date:
2014-11-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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.

History

#1

Updated by Electric Monk almost 5 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 587644a8567e6a9533f88401daa59cbd78c4632f

commit  587644a8567e6a9533f88401daa59cbd78c4632f
Author: Justin T. Gibbs <justing@spectralogic.com>
Date:   2014-11-23T03:11:13.000Z

    5312 libzfs should be decoupled from kernel's zfs_context.h
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Will Andrews <willa@spectralogic.com>
    Reviewed by: Andriy Gapon <avg@FreeBSD.org>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF