Roch wrote:
Dick Davies writes:
 > On 22/08/06, Bill Moore <[EMAIL PROTECTED]> wrote:
 > > On Mon, Aug 21, 2006 at 02:40:40PM -0700, Anton B. Rang wrote:
 > > > Yes, ZFS uses this command very frequently. However, it only does this
 > > > if the whole disk is under the control of ZFS, I believe; so a
 > > > workaround could be to use slices rather than whole disks when
 > > > creating a ZFS pool on a buggy device.
 > >
 > > Actually, we issue the command no matter if we are using a whole disk or
 > > just a slice.  Short of an mdb script, there is not a way to disable it.
 > > We are trying to figure out ways to allow users to specify workarounds
 > > for broken hardware without getting the ZFS code all messy as a result.
> > Has that behaviour changed then? I was definitely told (on list) that
 > write cache was only enabled for a 'full ZFS disk'. Am I wrong in
 > thinking this could be risky for UFS slices on the same disk
 > (or does UFS journalling mitigate that)?

There are 2 things: enabling write cache (done once on disk open)
and flushing the write cache every time it's required (say after
O_DSYNC write).

ZFS does a WCE  if it owns a whole disk.

And  it DKIOCFLUSHWRITECACHE  when  needed  on  all   disks,
whether or  not it enabled  the cache  (as somebody else may
have). If the device respond that this DKIOC is unsupported,
ZFS stops issuing the requests.

Also worth noting that some devices may have the write cache enabled by default (like SATA/IDE) so we issue the DKIOCFLUSHWRITECACHE even if we didn't enable it. Safety first.

Thanks,
George


-r

> > -- > Rasputin :: Jack of All Trades - Master of Nuns
 > http://number9.hellooperator.net/
 > _______________________________________________
 > zfs-discuss mailing list
 > zfs-discuss@opensolaris.org
 > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

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

Reply via email to