blk-core.c:EXPORT_SYMBOL(blk_get_request);
blk-core.c:EXPORT_SYMBOL(blk_requeue_request);
blk-core.c:EXPORT_SYMBOL(blk_insert_request);
blk-core.c:EXPORT_SYMBOL_GPL(__blk_put_request);
blk-core.c:EXPORT_SYMBOL(blk_put_request);
blk-core.c:EXPORT_SYMBOL(generic_make_request);
blk-core.c:EXPORT_SYMBOL(blk_complete_request);
blk-core.c:EXPORT_SYMBOL(end_queued_request);
blk-core.c:EXPORT_SYMBOL(end_dequeued_request);
blk-core.c:EXPORT_SYMBOL(end_request);
blk-core.c:EXPORT_SYMBOL_GPL(blk_end_request);
blk-core.c:EXPORT_SYMBOL_GPL(__blk_end_request);
blk-core.c:EXPORT_SYMBOL_GPL(blk_end_bidi_request);
blk-core.c:EXPORT_SYMBOL_GPL(blk_end_request_callback);
blk-settings.c:EXPORT_SYMBOL(blk_queue_make_request);
elevator.c:EXPORT_SYMBOL(__elv_add_request);
elevator.c:EXPORT_SYMBOL(elv_add_request);
elevator.c:EXPORT_SYMBOL(elv_next_request);
elevator.c:EXPORT_SYMBOL(elv_dequeue_request);
elevator.c:EXPORT_SYMBOL(elv_rb_former_request);
elevator.c:EXPORT_SYMBOL(elv_rb_latter_request);


207         rq = blk_get_request(q, writing ? WRITE : READ, GFP_KERNEL);
208         if (!rq)
209                 return -ENOMEM;
210
211         if (blk_fill_sghdr_rq(q, rq, hdr, file)) {
212                 blk_put_request(rq);
213                 return -EFAULT;
214         }
215
216         if (hdr->iovec_count) {
217                 const int size = sizeof(struct sg_iovec) * hdr->iovec_count;
218                 struct sg_iovec *iov;
219
220                 iov = kmalloc(size, GFP_KERNEL);
221                 if (!iov) {
222                         ret = -ENOMEM;
223                         goto out;
224                 }
225
226                 if (copy_from_user(iov, hdr->dxferp, size)) {
227                         kfree(iov);
228                         ret = -EFAULT;
229                         goto out;
230                 }
231
232                 ret = blk_rq_map_user_iov(q, rq, iov, hdr->iovec_count,
233                                           hdr->dxfer_len);
234                 kfree(iov);
235         } else if (hdr->dxfer_len)
236                 ret = blk_rq_map_user(q, rq, hdr->dxferp, hdr->dxfer_len);
237
238         if (ret)
239                 goto out;
240
241         bio = rq->bio;
242         memset(sense, 0, sizeof(sense));
243         rq->sense = sense;
244         rq->sense_len = 0;
245         rq->retries = 0;
246
247         start_time = jiffies;
248
249         /* ignore return value. All information is passed back to caller
250          * (if he doesn't check that is his problem).
251          * N.B. a non-zero SCSI status is _not_ necessarily an error.
252          */
253         blk_execute_rq(q, bd_disk, rq, 0);
254
255         hdr->duration = jiffies_to_msecs(jiffies - start_time);
256
257         return blk_complete_sghdr_rq(rq, hdr, bio);



---------- Forwarded message ----------
From: Rohit Sharma <[EMAIL PROTECTED]>
Date: Wed, Sep 10, 2008 at 12:51 AM
Subject: Request queues and bio structures
To: Kernelnewbies <[EMAIL PROTECTED]>


I was going through block drivers,
i am not able to associate request queues and bio structures.
How are the requests processed using bio structures.
Can anyone provide me with block driver example or tutorial.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ




-- 
Regards,
Peter Teoh

Reply via email to