Skip to contentSkip to conversation

blkdev_issue_flush really issues a WRITE_BARRIER -- is that okay?

DISCUSSION Jeff Moyer 2 participants 2 messages Oct 12, 2009

lore
Share & tools
lore

Jeff Moyer

author
#0 lore raw

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

#1 lore raw
Quoted 7 lines · Jeff Moyer

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?

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