Hello,

On Tue, 07 Apr 2009, Ashok Gautham wrote:
> Data is not written immediately. It is written asynchronously. You
> can force it to be written to the disk by using the sync call.. This
> call will exit only when all data waiting to be written has been
> written (This works even when you have two or more disks where data
> remains unwritten)

Not really! See the recent discussion on sync, fsync and so on on
LKML or the kernel page of LWN. For example,
 http://lwn.net/Articles/325420/ says:

 All [sync] does is preƫmpt the normally delayed flushing of dirty blocks by
 expiring them all.  It does *not* write them.  They just go on the
 various disk queues to be written to each device, but that doesn't get
 them there -- yet.  Once upon a time, and on some systems still, there
 was a user process called update(8) that did this sort of thing every 30
 seconds or so.

Then there are "write-caching" disk-controllers etc. ...

To ensure that data gets written to a removable device you should
"umount" it. Then wait for the activity light on the device to go off
(if it is not broken!) before unplugging/remove the device.

Kapil.
--

_______________________________________________
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to