Add linux kernel disk support

Native Linux vdev disk interfaces

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2010-08-26 11:45:02 -07:00
parent 325f023544
commit 60101509ee
27 changed files with 2575 additions and 116 deletions
+10
View File
@@ -1069,6 +1069,15 @@ vdev_open_child(void *arg)
boolean_t
vdev_uses_zvols(vdev_t *vd)
{
/*
* Stacking zpools on top of zvols is unsupported until we implement a method
* for determining if an arbitrary block device is a zvol without using the
* path. Solaris would check the 'zvol' path component but this does not
* exist in the Linux port, so we really should do something like stat the
* file and check the major number. This is complicated by the fact that
* we need to do this portably in user or kernel space.
*/
#if 0
int c;
if (vd->vdev_path && strncmp(vd->vdev_path, ZVOL_DIR,
@@ -1077,6 +1086,7 @@ vdev_uses_zvols(vdev_t *vd)
for (c = 0; c < vd->vdev_children; c++)
if (vdev_uses_zvols(vd->vdev_child[c]))
return (B_TRUE);
#endif
return (B_FALSE);
}