ioctl, fsync - how to flush block device buffers? asks a simple, yet still unanswered question: how to have a device’s buffers get flushed on critical times (such as when a USB stick or otherwise removable storage medium is about to get ejected).
Since merely resorting to an ioctl is not possible, because of permission issues, I’d suggest a standalone command, that runs as root, to do the job. Much like mount.
Think about it: we have a sync command. GNOME could also ship a bflush /dev/some-device-about-to-be-removed command, which doesn’t return until the device has been flushed. Then, gnome-volume-manager could resort to invoking bflush. Plus, bflush itself would take care of checking whether the invoking user has the right to perform a buffer flush on said device. For security, this hypothetical bflush command should not even need to link to GNOME libraries.
That command can be built portably. Later on, at some point, the author could push for its inclusion in one of the standard packages for disk tools. Down the road, it could be standardized as part of LSB or maybe even other POSIX-compliant operating systems.