First page Back Continue Last page Graphics
Barriers – Definition
In simple terms, we use barriers to enforce ordering of I/O.
Their primary use is to create a checkpoint in a filesystem journal, ensuring all requests queued ahead of the barrier are complete and reached the physical medium, and any requests queued after it are only started after that point.
Barriers may or may not be sent with data. A request to the block layer to flush a device is now implemented by sending a barrier I/O without data.
If a device driver cannot process a barrier it responds with -EOPNOTSUPP and the caller may need to implement the barrier itself.