APIs to submit bios at block layer

Pranay Kr. Srivastava pranjas at gmail.com
Mon Apr 14 11:00:47 EDT 2014



On April 14, 2014 8:21:05 PM GMT+05:30, KASHISH BHATIA <kashish.bhatia1989 at gmail.com> wrote:
>Hi all,
>
>Could anyone explain the difference between submit_bio() and
>generic_make_request() ?
>How they are different in functionality?
>How lower layers treat bios submitted via submit_bio() /
>generic_make_request() ?
>When is it preferable to use api generic_make_request() than
>submit_bio()

A request has bio(s). You normally would bio_alloc then set up your bio and finally get a reference to it and submit_bio.

At this point you would be in file system layer.

After submit you enter block layer which would either try to merge that bio with an existing request or create a new request for the lower level driver.

>api?

The usage is clearly separate. Submit the bio from file system, create the request for the driver in block layer.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the Kernelnewbies mailing list