b18019d2d8
zvol_write() assumes that the write request must be written to stable storage if rq_is_sync() is true. Unfortunately, this assumption is incorrect. Indeed, "sync" does *not* mean what we think it means in the context of the Linux block layer. This is well explained in linux/fs.h: WRITE: A normal async write. Device will be plugged. WRITE_SYNC: Synchronous write. Identical to WRITE, but passes down the hint that someone will be waiting on this IO shortly. WRITE_FLUSH: Like WRITE_SYNC but with preceding cache flush. WRITE_FUA: Like WRITE_SYNC but data is guaranteed to be on non-volatile media on completion. In other words, SYNC does not *mean* that the write must be on stable storage on completion. It just means that someone is waiting on us to complete the write request. Thus triggering a ZIL commit for each SYNC write request on a ZVOL is unnecessary and harmful for performance. To make matters worse, ZVOL users have no way to express that they actually want data to be written to stable storage, which means the ZIL is broken for ZVOLs. The request for stable storage is expressed by the FUA flag, so we must commit the ZIL after the write if the FUA flag is set. In addition, we must commit the ZIL before the write if the FLUSH flag is set. Also, we must inform the block layer that we actually support FLUSH and FUA. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> |
||
---|---|---|
.. | ||
always-no-unused-but-set-variable.m4 | ||
arch.am | ||
config.awk | ||
config.guess | ||
config.sub | ||
deb.am | ||
depcomp | ||
install-sh | ||
kernel-bdev-block-device-operations.m4 | ||
kernel-bdev-logical-size.m4 | ||
kernel-bdi-setup-and-register.m4 | ||
kernel-bdi.m4 | ||
kernel-bio-empty-barrier.m4 | ||
kernel-bio-end-io-t-args.m4 | ||
kernel-bio-failfast.m4 | ||
kernel-bio-rw-syncio.m4 | ||
kernel-blk-end-request.m4 | ||
kernel-blk-fetch-request.m4 | ||
kernel-blk-queue-flush.m4 | ||
kernel-blk-requeue-request.m4 | ||
kernel-blk-rq-bytes.m4 | ||
kernel-blk-rq-pos.m4 | ||
kernel-blk-rq-sectors.m4 | ||
kernel-blkdev-get-by-path.m4 | ||
kernel-check-disk-size-change.m4 | ||
kernel-d-obtain-alias.m4 | ||
kernel-evict-inode.m4 | ||
kernel-fmode-t.m4 | ||
kernel-fsync.m4 | ||
kernel-get-disk-ro.m4 | ||
kernel-insert-inode-locked.m4 | ||
kernel-invalidate-bdev-args.m4 | ||
kernel-kobj-name-len.m4 | ||
kernel-mount-nodev.m4 | ||
kernel-open-bdev-exclusive.m4 | ||
kernel-rq-for-each_segment.m4 | ||
kernel-rq-is_sync.m4 | ||
kernel-security-inode-init.m4 | ||
kernel-set-nlink.m4 | ||
kernel-show-options.m4 | ||
kernel-shrink.m4 | ||
kernel-truncate-setsize.m4 | ||
kernel-xattr-handler.m4 | ||
kernel.m4 | ||
ltmain.sh | ||
missing | ||
rpm.am | ||
Rules.am | ||
suppressed-warnings.txt | ||
tgz.am | ||
user-arch.m4 | ||
user-frame-larger-than.m4 | ||
user-ioctl.m4 | ||
user-libblkid.m4 | ||
user-libuuid.m4 | ||
user-nptl_guard_within_stack.m4 | ||
user-selinux.m4 | ||
user-udev.m4 | ||
user-zlib.m4 | ||
user.m4 | ||
zfs-build.m4 | ||
zfs-meta.m4 |