Conceptual questions about device driver
greg.freemyer at gmail.com
Thu Aug 1 23:21:48 EDT 2013
neha naik <nehanaik27 at gmail.com> wrote:
> I have some conceptual questions about device driver :
>1. Write order fidelity should be maintained when submitting requests
>device driver to disk below.
> However, acknowledging these requests it is okay if we don't
>necessarily maintain that order, right?
I should know, but I don't think your question makes sense. Data transfers are axles immediately upon receipt by the drive. When the drive actually puts it to stable storage there is not another ack message.
I believe disk drives can typically cache a handful of tracks at a time. They can do a elevator sort internally on the tracks so the right order is not guarenteed but that has nothing to do with acks back to the driver.
>2. Also i want to understand what the device driver does say if in a
>multiple paged bio, some of the pages get written
> and some don't, we send the error in the bio. But what about the pages
>it has already written??? It can't possibly
> do anything about it, right?
I believe the entire bio is failed. The old data is considered lost and the new never written. Higher levels may retry smaller sections to see how much they can get out.
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
More information about the Kernelnewbies