blkdev_issue_flush really issues a WRITE_BARRIER -- is that okay?
Hi,
While looking though Christoph's patch to call blkdev_issue_flush for fsync on block devices, I noticed that it only issues a WRITE_BARRIER. I don't see how that guarantees that data is on stable storage. Am I missing something? Shouldn't this translate to a FLUSH CACHE or SYNCHRONIZE CACHE command?
My apologies if this has been discussed before.
Thanks!
Jeff
Quoted 7 lines · Jeff Moyer
Hi,
While looking though Christoph's patch to call
blkdev_issue_flushfor fsync on block devices, I noticed that it only issues aWRITE_BARRIER. I don't see how that guarantees that data is on stable storage. Am I missing something? Shouldn't this translate to a FLUSH CACHE or SYNCHRONIZE CACHE command?
Barriers are a high level primitive that exist at the block layer level.
Lower level storage drivers then convert barriers to a hardware-specific low level primitive such as SYNCHRONIZE CACHE or FUA.
Jeff