Re: need help in understanding basics of block device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nidhi,

Seems like you are stuck up with this issue.

Refer the following links if you haven't
Check out this link to understand block device driver
http://lwn.net/Articles/driver-porting/

for bio structures check this link
http://lwn.net/Articles/26404/
>
> in gyst :
> when you actually transfer data in request processing function
> using req->current_nr_sectors
> from req->buffer
> in while elv_next_request loop

Please try to provide with the code snippet, will help us understand the
problem better.

> and if its transferred successfully book does end_request(req,1)
>
> then my ques is
> Q1.  end_request doesnt end the request but ends the part of request
> what is that part --- a bio OR a segment or what ?
>
A request consists of a list of bios and bios consists of several segments,
and the end request is called to finish the processing of current request.

> by seeing current_nr_sectors it seems it transfer segment by segment ---
> but seeing req->buffer (equivalent to bio_data(current bio)) seems transferring bio by bio ??
>
i think you are referring to sbd_transfer() function,

sbd_transfer(&Device, req->sector, req->current_nr_sectors,
                            req->buffer, rq_data_dir(req));

what i understand is that it says transfer these many sectors
'req->current_nr_sectors'
starting from sector no. 'req->sector' from buffer 'req->buffer' and
direction of data
'rq_data_dir(req)' --> says READ or WRITE request.



I hope that helps.



Thanks.
>
> Nidhi
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Thanks & Regards
> Nidhi

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



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux