[rhelv6-beta-list] Anyone can explain more details of that?

Kirby Zhou kirbyzhou at gmail.com
Thu Jul 1 02:12:49 UTC 2010


Anyone can explain more details of that?

When using the DIF/DIX hardware checksum features of a storage path behind a
block device, errors will occur if the block device is used as a general
purpose block device. 
Buffered I/O or mmap(2) based IO will not work reliably as there are no
interlocks in the buffered write path to prevent overwriting cached data
while the hardware is performing DMA operations. An overwrite during a DMA
operation will cause a torn write and the write will fail checksums in the
hardware storage path. This problem is common to all block device or file
system based buffered or mmap(2) I/O, so the problem of I/O errors during
overwrites cannot be worked around. 
DIF/DIX enabled block devices should only be used with applications that use
O_DIRECT I/O. Applications should use the raw block device, though it should
be safe to use the XFS file system on a DIF/DIX enabled block device if only
O_DIRECT I/O is issued through the file system. In both cases the
responsibility for preventing torn writes lies with the application, so only
applications designed for use with O_DIRECT I/O and DIF/DIX hardware should
enable this feature.

What is a DIF/DIX hardware?
And why a DMA operation will conflict with cached data?

  Regards
  Kirby Zhou






More information about the rhelv6-beta-list mailing list