svn commit: r237770 - in stable/9: sys/boot/pc98/libpc98
sys/boot/zfs tools/tools/zfsboottest
Andriy Gapon
avg at FreeBSD.org
Fri Jun 29 10:28:46 UTC 2012
Author: avg
Date: Fri Jun 29 10:28:46 2012
New Revision: 237770
URL: http://svn.freebsd.org/changeset/base/237770
Log:
MFC r235392,235394,235395: fixes and cleanups for zfs boot MFC
Modified:
stable/9/sys/boot/pc98/libpc98/Makefile
stable/9/sys/boot/zfs/zfs.c
stable/9/tools/tools/zfsboottest/zfsboottest.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
stable/9/sys/dev/ (props changed)
stable/9/sys/dev/e1000/ (props changed)
stable/9/sys/dev/isp/ (props changed)
stable/9/sys/dev/ixgbe/ (props changed)
stable/9/sys/fs/ (props changed)
stable/9/sys/fs/ntfs/ (props changed)
stable/9/sys/modules/ (props changed)
stable/9/tools/tools/ (props changed)
stable/9/tools/tools/ath/ (props changed)
stable/9/tools/tools/ether_reflect/ (props changed)
stable/9/tools/tools/nanobsd/ (props changed)
stable/9/tools/tools/syscall_timing/ (props changed)
stable/9/tools/tools/vimage/ (props changed)
stable/9/tools/tools/zfsboottest/ (props changed)
Modified: stable/9/sys/boot/pc98/libpc98/Makefile
==============================================================================
--- stable/9/sys/boot/pc98/libpc98/Makefile Fri Jun 29 10:28:40 2012 (r237769)
+++ stable/9/sys/boot/pc98/libpc98/Makefile Fri Jun 29 10:28:46 2012 (r237770)
@@ -10,6 +10,8 @@ SRCS= bioscd.c biosdisk.c biosmem.c bios
comconsole.c devicename.c elf32_freebsd.c \
i386_copy.c i386_module.c nullconsole.c pc98_sys.c pxe.c pxetramp.s \
time.c vidconsole.c
+.PATH: ${.CURDIR}/../../zfs
+SRCS+= devicename_stubs.c
# Enable PXE TFTP or NFS support, not both.
.if defined(LOADER_TFTP_SUPPORT)
Modified: stable/9/sys/boot/zfs/zfs.c
==============================================================================
--- stable/9/sys/boot/zfs/zfs.c Fri Jun 29 10:28:40 2012 (r237769)
+++ stable/9/sys/boot/zfs/zfs.c Fri Jun 29 10:28:46 2012 (r237770)
@@ -56,7 +56,6 @@ static int zfs_stat(struct open_file *f,
static int zfs_readdir(struct open_file *f, struct dirent *d);
struct devsw zfs_dev;
-struct devsw zfs_dev_compat;
struct fs_ops zfs_fsops = {
"zfs",
@@ -90,7 +89,7 @@ zfs_open(const char *upath, struct open_
struct file *fp;
int rc;
- if (f->f_dev != &zfs_dev && f->f_dev != &zfs_dev_compat)
+ if (f->f_dev != &zfs_dev)
return (EINVAL);
/* allocate file system specific data structure */
Modified: stable/9/tools/tools/zfsboottest/zfsboottest.c
==============================================================================
--- stable/9/tools/tools/zfsboottest/zfsboottest.c Fri Jun 29 10:28:40 2012 (r237769)
+++ stable/9/tools/tools/zfsboottest/zfsboottest.c Fri Jun 29 10:28:46 2012 (r237770)
@@ -89,7 +89,11 @@ main(int argc, char** argv)
char buf[512], hash[33];
MD5_CTX ctx;
struct stat sb;
+ struct zfsmount zfsmnt;
dnode_phys_t dn;
+#if 0
+ uint64_t rootobj;
+#endif
spa_t *spa;
off_t off;
ssize_t n;
@@ -138,14 +142,28 @@ main(int argc, char** argv)
exit(1);
}
- if (zfs_mount_pool(spa)) {
- fprintf(stderr, "can't mount pool\n");
+ if (zfs_spa_init(spa)) {
+ fprintf(stderr, "can't init pool\n");
exit(1);
}
+#if 0
+ if (zfs_get_root(spa, &rootobj)) {
+ fprintf(stderr, "can't get root\n");
+ exit(1);
+ }
+
+ if (zfs_mount(spa, rootobj, &zfsmnt)) {
+#else
+ if (zfs_mount(spa, 0, &zfsmnt)) {
+ fprintf(stderr, "can't mount\n");
+ exit(1);
+ }
+#endif
+
printf("\n");
for (++i, failures = 0; i < argc; i++) {
- if (zfs_lookup(spa, argv[i], &dn)) {
+ if (zfs_lookup(&zfsmnt, argv[i], &dn)) {
fprintf(stderr, "%s: can't lookup\n", argv[i]);
failures++;
continue;
More information about the svn-src-stable-9
mailing list