On Fri, Jun 09, 2006 at 06:36:23PM +0100, Ricardo Correia wrote:
> Ok, I'm glad to know my analysis was correct (I wasn't sure about it, though).
>
> This means that the ztest port to Linux now doesn't have any known bugs ;)
>
> Thank you for the fast response.
Sweet! Let us know if you had to make any changes to non-zfs_context
code, and we can integrate the changes upstream to make future
maintenance/other ports easier. FYI, the fix I'll putback is slightly
different from what I mentioned previously:
------- usr/src/cmd/ztest/ztest.c -------
Index: usr/src/cmd/ztest/ztest.c
--- /ws/onnv-clone/usr/src/cmd/ztest/ztest.c Fri Jun 2 23:04:35 2006
+++ /export/eschrock/on-fixes/usr/src/cmd/ztest/ztest.c Fri Jun 9
10:46:35 2006
@@ -934,16 +934,16 @@
*
* If newvd is already part of the pool, it should fail with
* EBUSY.
*
* If newvd is too small, it should fail with EOVERFLOW.
*/
- if (pvd->vdev_ops != &vdev_mirror_ops &&
+ if (newvd != NULL)
+ expected_error = EBUSY;
+ else if (pvd->vdev_ops != &vdev_mirror_ops &&
pvd->vdev_ops != &vdev_root_ops &&
(!replacing || pvd->vdev_ops == &vdev_replacing_ops))
expected_error = ENOTSUP;
- else if (newvd != NULL)
- expected_error = EBUSY;
else if (newsize < oldsize)
expected_error = EOVERFLOW;
else if (ashift > oldvd->vdev_top->vdev_ashift)
expected_error = EDOM;
else
We already had the check for EBUSY, it just needed to be moved ahead of
ENOTSUP just like the associated code.
- Eric
--
Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock