If anybody very familiar with Linux internals could review this I would
really appreciate it:
https://github.com/gordan-bobic/zfs-fuse/compare/cache_flushing

The reason for this is that the current solution, at least on some kernels,
produces thousands upon thousands of these warnings:
scsi_verify_blk_ioctl: 6 callbacks suppressed
zfs-fuse: sending ioctl 2285 to a partition!

This is arising because the ATA flush cache ioctl is being issued to a
partition rather than the disk. I implemented the above patch, which does
the following:

If the underlying block device is a raw ATA/IDE/SCSI disk, issue the ATA
flush cache commant. Otherwise, issue:
fsync(fd);
ioctl(fd, BLKFLSBUF, 0);

Can somebody confirm or deny whether this is sufficient to ensure that the
data in the disk's write caches is committed to physical storage, assuming
the disk is behaving correctly?

Many thanks.

Gordan
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to