Date: Sun, 14 Oct 2012 07:52:38 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241533 - stable/8/sys/boot/zfs Message-ID: <201210140752.q9E7qcdv017785@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Sun Oct 14 07:52:38 2012 New Revision: 241533 URL: http://svn.freebsd.org/changeset/base/241533 Log: MFC r241282: zfs boot: chose a "first" pool if none is explicitly requested Modified: stable/8/sys/boot/zfs/zfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/zfs.c ============================================================================== --- stable/8/sys/boot/zfs/zfs.c Sun Oct 14 07:52:25 2012 (r241532) +++ stable/8/sys/boot/zfs/zfs.c Sun Oct 14 07:52:38 2012 (r241533) @@ -429,7 +429,10 @@ zfs_dev_open(struct open_file *f, ...) dev = va_arg(args, struct zfs_devdesc *); va_end(args); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); rv = zfs_spa_init(spa); @@ -543,7 +546,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); return (buf);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210140752.q9E7qcdv017785>