grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getroot for ZFS without libzfs?


From: Robert Millan
Subject: Re: getroot for ZFS without libzfs?
Date: Tue, 9 Aug 2011 13:54:38 +0200

Hi Zachary,

2011/8/8 Zachary Bedell <address@hidden>:
> It appears that existing Grub code already links against libzfs for the 
> benefit of find_root_device_from_libzfs and other functions in getroot.c.  It 
> also appears that libzfs is not used outside this file.  That linkage 
> surprises me a bit as I would have expected GPL Grub linked against CDDL 
> libzfs to create a problem.

Not really.  This kind of use falls under the system library
exception, see section 1 of the GPL.

> Also libzfs is considered a private API and not intended to be linked 
>against, though admittedly what I propose (reading on-disk structures 
>directly) is arguably worse than accessing a private library.

I don't think you can figure out the disks corresponding to a zpool
just by reading disk structures.  You can guess, but only the kernel
knows for sure.

The other API that is available to us is /dev/zfs.  But is that device
meant to be used directly?  How stable is this interface?

-- 
Robert Millan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]