On Sun, May 17, 2009 at 02:16:01PM +0300, Ahmed Kamal wrote:

> I am wondering whether the reliability of solaris/zfs is still guaranteed if
> I will be running zfs not directly over real hardware, but over Xen
> virtualization ? The plan is to assign physical raw access to the disks to
> the xen guest. I remember zfs having problems with hardware that lies about
> disk write ordering, wonder how that is handled over Xen, or if that issue
> has been completely resolved

You can read the frontend sources here:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/xen/io/xdf.c

If both dom0 and domU are Solaris, then any disk cache flushes are
passed through via FLUSH_DISKCACHE. If the dom0 is Linux, then we
attempt to emulate a flush by using WRITE_BARRIER (annoyingly, this
requires us to write a block as well, so in this case, we cache one).

In the backend (xdb or xpvtap), we pass along the flush request, either
via an in kernel flush:

    683                 (void) ldi_ioctl(vdp->xs_ldi_hdl,
    684                     DKIOCFLUSHWRITECACHE, NULL, FKIOCTL, kcred, NULL);

or via VDFlush() in the VirtualBox code we use (which essentially ends
up as an fsync()).

Thus as long as the ioctl and/or fsync are obeyed, things should be
good. Hope that's clearer.

regards
john
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to