OpenSolaris

Printable Version Enter a New Search
Bug ID 6496356
Synopsis zvol should behave like a write-caching device
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:zfs
Keywords
Responsible Engineer Bill Moore
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_59
Fixed In snv_59
Release Fixed solaris_nevada(snv_59) , solaris_10u4(s10u4_08) (Bug ID:2148265)
Related Bugs 6762694 , 6770534 , 6794730 , 6794737
Submit Date 22-November-2006
Last Update Date 2-March-2007
Description
Currently, the only way zvol will return to the caller before data is committed to disk
is if we are called as part of fsflush pushing out dirty pages.  This leads to a very
performance-poor situation.

The ideal case is for zvol to behave like a real disk.  Real disks have a write cache
and will acknowledge a write before it hits media.  If you actually care whether or
not your data is actually on stable storgae, you send down a special command that doesn't
complete until all dirty data is on the device's media.

This means that zvol needs to support this special command (DKIOCFLUSHWRITECACHE), and
that it should save zil_commit() for only the times it's necessary.  For every write
that comes in, we will need to create a ZIL record.  Once that's done, we can return
to the caller.  If, at a later time, the caller either does an fsync() or issues
the DKIOCFLUSHWRITECACHE ioctl(), we need to force all the ZIL records to stable
storage.  This will allow us to get much better concurrency (and performance), while
having semantics of a normal disk (which everyone is already familiar with).
Work Around
N/A
Comments
N/A