I have a compact-flash memory card detected as a block device
/dev/sdb. It has a single FAT16 partition. Now if I mount the FAT16 file-system, write something to the file system and
umount the file system, then actual writing of the file takes place during the
# mount | grep sdb /dev/sdb1 on /media type vfat (rw) # time cp image.bin /media/ real 0m0.179s user 0m0.000s sys 0m0.104s # time umount /media real 0m18.185s user 0m0.004s sys 0m0.032s #
I have seen similar behavior with USB flash-memory. What determines if the file is written to the file system right away or during the file system detaching?