Skip to content

Commit

Permalink
Allow setting bootfs on any pool
Browse files Browse the repository at this point in the history
The vdev_is_bootable() restrictions are no longer necessary
with recent GRUB2 code.  FreeBSD has implemented the same
change, except that I moved the Solaris comment to be inside
the #ifdef __sun__ block.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#317
  • Loading branch information
rlaager authored and behlendorf committed Jan 17, 2012
1 parent 08d08eb commit 57a4edd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions module/zfs/vdev.c
Expand Up @@ -3053,13 +3053,17 @@ vdev_set_state(vdev_t *vd, boolean_t isopen, vdev_state_t state, vdev_aux_t aux)

/*
* Check the vdev configuration to ensure that it's capable of supporting
* a root pool. Currently, we do not support RAID-Z or partial configuration.
* In addition, only a single top-level vdev is allowed and none of the leaves
* can be wholedisks.
* a root pool.
*/
boolean_t
vdev_is_bootable(vdev_t *vd)
{
#if defined(__sun__) || defined(__sun)
/*
* Currently, we do not support RAID-Z or partial configuration.
* In addition, only a single top-level vdev is allowed and none of the
* leaves can be wholedisks.
*/
int c;

if (!vd->vdev_ops->vdev_op_leaf) {
Expand All @@ -3080,6 +3084,7 @@ vdev_is_bootable(vdev_t *vd)
if (!vdev_is_bootable(vd->vdev_child[c]))
return (B_FALSE);
}
#endif /* __sun__ || __sun */
return (B_TRUE);
}

Expand Down

0 comments on commit 57a4edd

Please sign in to comment.