Hi!

On 11:00 Tue 29 Jun     , Sudheer wrote:
> One basic doubt regarding block layer & write system call. When a
> process writes to a file in blocking mode, when the 'write' system
> call returns,
> 
> A. will the process be returned only after actually writing the data
> on to the target block device? In this case we will get the benefit of
> elevator only if multiple processes are writing to the adjacent
> locations in the device. Is this true?

Usually not, but you might get this behaviour by specifying the mount option
"sync" on some file systems.

> 
> 
> OR
> 
> B. will the process be returned after scheduling the writing (say
> after passing the data to the elevator)?

Yes, this is what usually happens.

> If this case is true, how
> would the process ensure that the data has been actually written on to
> the block device?

By calling fsync() .

        -Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to