title: How to confirm whether a block device is not being written anymore after a file write?
body: <p>When I finish writing a file into a device block (for example, <code>/dev/sda</code>), I have to wait a while to ensure that the buffer is still not being written anymore to the device. I have to set a callback to trigger a UI event when that finishes.</p>
  <p>I have tried using the <a href="http://storaged.org/doc/udisks2-api/latest/gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Ejectable" rel="nofollow noreferrer"><code>ejectable</code> property from udisks2</a>, and as the documentation says, it's only a guess. It has not been reliable in my experiments.</p>
  <p>I have noticed that when the flushing finishes my file manager (Nautilus) lets me unmount the device. What API provides me with such device property?</p>