Thanks for the responses. I have one more question for Greg. I come from filesystem background and not device driver so i may be a bit confused <br>about the write order fidelity. I know that filesystems guarantee that. Looking from filesystem perspective, no write will be allowed on the same block until<br>
the first write finishes. So, if 'B' is written after 'A' you can always guarantee that you will see 'B' at the end of the two writes.<br> Now imagine not having a filesystem, and doing a write directly on the device. Do device drivers honour it. Should they? I imagine device driver as a kind of<br>
queue. So any writes are always queued up one after the other so that it gives write order fidelity whether it wants to or not. Am i missing something here.<br><br>Regards,<br>Neha<br> <br><br><div class="gmail_quote">On Fri, Aug 2, 2013 at 1:56 PM, Greg Freemyer <span dir="ltr"><<a href="mailto:greg.freemyer@gmail.com" target="_blank">greg.freemyer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Aug 2, 2013 at 1:32 AM, Rajat Sharma <<a href="mailto:fs.rajat@gmail.com">fs.rajat@gmail.com</a>> wrote:<br>
> On Fri, Aug 2, 2013 at 2:25 AM, neha naik <<a href="mailto:nehanaik27@gmail.com">nehanaik27@gmail.com</a>> wrote:<br>
>> Hi,<br>
>> I have some conceptual questions about device driver :<br>
>><br>
>> 1. Write order fidelity should be maintained when submitting requests from<br>
>> device driver to disk below.<br>
>> However, acknowledging these requests it is okay if we don't necessarily<br>
>> maintain that order, right?<br>
>><br>
><br>
> Yes it should not matter as long as application can rely on data being<br>
> written is in order of submission.<br>
<br>
</div>But it can't ..... unless the write cache is turned off and it is<br>
known the the cache is truly off.<br>
<br>
There is no guarantee of write order in the block stack. Not between<br>
the filesystem and the driver. Not between the driver and the drive.<br>
<br>
There are at least 2 elevators shuffling the order of writes to<br>
optimize performance.<br>
<br>
Rajat, did you get confused? Or were you trying to say something else?<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
</font></span></blockquote></div><br>