freebsd-src/sys
Andriy Gapon 1702e62f67 zfsboot/zfsloader: support accessing filesystems within a pool
In zfs loader zfs device name format now is "zfs:pool/fs",
fully qualified file path is "zfs:pool/fs:/path/to/file"
loader allows accessing files from various pools and filesystems as well
as changing currdev to a different pool/filesystem.

zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or,
as before, pool:path/to/file; in the latter case a default filesystem
is used (pool root or bootfs).  zfsboot passes guids of the selected
pool and dataset to zfsloader to be used as its defaults.

zfs support should be architecture independent and is provided
in a separate library, but architectures wishing to use this zfs support
still have to provide some glue code and their devdesc should be
compatible with zfs_devdesc.
arch_zfs_probe method is used to discover all disk devices that may
be part of ZFS pool(s).

libi386 unconditionally includes zfs support, but some zfs-specific
functions are stubbed out as weak symbols.  The strong definitions
are provided in libzfsboot.
This change mean that the size of i386_devspec becomes larger
to match zfs_devspec.

Backward-compatibility shims are provided for recently added sparc64
zfs boot support.  Currently that architecture still works the old
way and does not support the new features.

TODO:
- clear up pool root filesystem vs pool bootfs filesystem distinction
- update sparc64 support
- set vfs.root.mountfrom based on currdev (for zfs)

Mid-future TODO:
- loader sub-menu for selecting alternative boot environment

Distant future TODO:
- support accessing snapshots, using a snapshot as readonly root

Reviewed by:	marius (sparc64),
		Gavin Mu <gavin.mu@gmail.com> (sparc64)
Tested by:	Florian Wagner <florian@wagner-flo.net> (x86),
		marius (sparc64)
No objections:	fs@, hackers@
MFC after:	1 month
2012-05-12 09:03:30 +00:00
..
amd64 Add options GEOM_RAID into i386 and amd64 GENERIC kernels. 2012-05-10 12:37:32 +00:00
arm Remove unused cruft. We call through memcpy more directly when we 2012-05-11 17:49:00 +00:00
boot zfsboot/zfsloader: support accessing filesystems within a pool 2012-05-12 09:03:30 +00:00
bsm
cam Add support for: 2012-04-29 22:28:15 +00:00
cddl Import illumos changeset 13686:4bc0783f6064 2012-05-10 10:39:45 +00:00
compat - >500 static DTrace probes for the linuxulator 2012-05-05 19:42:38 +00:00
conf Further arswitch work: 2012-05-12 05:26:49 +00:00
contrib Revert r234834 per luigi@ request. 2012-05-03 08:56:43 +00:00
crypto Add support for the extended FPU states on amd64, both for native 2012-01-21 17:45:27 +00:00
ddb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
dev * Remove the AR7240 register defines and reuse the AR8x16 defines. 2012-05-12 06:24:21 +00:00
fs Fix mount interlock oversights from the previous change in r234386. 2012-05-10 20:28:33 +00:00
gdb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
geom - Prevent error status leak if write to some of the RAID1/1E volume disks 2012-05-11 13:20:17 +00:00
gnu/fs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
i386 Add options GEOM_RAID into i386 and amd64 GENERIC kernels. 2012-05-10 12:37:32 +00:00
ia64 Don't assume we have legacy PICs (i.e. 8259A in cascade) at the legacy 2012-05-04 23:16:29 +00:00
isa - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
kern Revert previous revision, misunderstood the code :( 2012-05-11 23:43:32 +00:00
kgssapi
libkern Remove second consts in r233288 in order to appease C++ compilers. 2012-03-26 18:22:04 +00:00
mips Now that there's a hint for it, add a "I'm an AR7240 switch!" hint. 2012-05-12 05:27:14 +00:00
modules Add support for Ralink RT2800/RT3000 chipsets. 2012-05-10 17:41:16 +00:00
net Revert r234834 per luigi@ request. 2012-05-03 08:56:43 +00:00
net80211 Update HWMP Proactive code and mesh route flags. 2012-05-01 16:18:38 +00:00
netatalk Fix typos 2012-02-28 15:07:05 +00:00
netgraph Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags. 2012-04-22 17:00:52 +00:00
netinet General mdoc(7) and typo fixes. 2012-05-11 20:06:46 +00:00
netinet6 in6_pcblookup_local() still can return a pcb with NULL 2012-03-21 08:43:38 +00:00
netipsec Add multi-FIB IPv6 support to the core network stack supplementing 2012-02-03 13:08:44 +00:00
netipx Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netnatm
netncp
netsmb Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
nfs Add multi-FIB IPv6 support to the core network stack supplementing 2012-02-03 13:08:44 +00:00
nfsclient Fix mount mutex handling missed in r234386. 2012-05-10 21:38:48 +00:00
nfsserver Honor NFSv3 commit call (RFC 1813, Section 3.3.21) where when count is 0, 2011-12-15 02:26:53 +00:00
nlm jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011 2012-01-31 02:11:05 +00:00
ofed Revert r234834 per luigi@ request. 2012-05-03 08:56:43 +00:00
opencrypto
pc98 Clean up the intr* MD KPI from the SMP dependency, removing a cause of 2012-04-26 20:24:25 +00:00
pci intpm: add ATI IXP400 pci id 2012-04-16 10:33:46 +00:00
powerpc Fix final bugs in memory barriers on PowerPC: 2012-05-04 16:00:22 +00:00
rpc Both a crash reported on freebsd-current on Oct. 18 under the 2011-11-03 14:38:03 +00:00
security Check vplabel for NULL before dereferencing it. Fixes a panic 2012-05-03 15:51:34 +00:00
sparc64 Fix mismerge in r235231. 2012-05-10 15:23:20 +00:00
sys Add definition for the -z nodefaultlib flag. 2012-05-06 18:34:31 +00:00
teken
tools Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR. 2012-02-21 19:35:59 +00:00
ufs Remove unused thread argument from ufs_extattr_uepm_lock()/ufs_extattr_uepm_unlock(). 2012-04-23 17:56:35 +00:00
vm Give vm_fault()'s sequential access optimization a makeover. 2012-05-10 15:16:42 +00:00
x86 Revert part of r234723 by re-enabling the SMP protection for 2012-05-03 21:44:01 +00:00
xdr
xen blkif interface comment cleanups. No functional changes 2012-02-29 17:47:01 +00:00
Makefile Add sys/ofed to the 'make cscope' target. 2012-03-20 18:05:15 +00:00