Re: end_request() deprecated, which one should be used ?

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

 



Hi Jens,

Le Tue, 2 Sep 2008 08:46:49 +0200,
Jens Axboe <jens.axboe@xxxxxxxxxx> a écrit :

> end_request() is deprecated, and only that one. You can use
> end_dequeued_request() or end_queued_request() to completely end a
> dequeued or queued request. Or you can use blk_end_request() to end
> nr_bytes of IO on that request. Those are the functions that you
> should use. And yes, you should use __blk_end_request() if you
> already have the queue lock grabbed.

Thanks for this answer. However, it raises a few more questions:

 * end_queued_request() and end_dequeued_request() have exactly the
   same code, so what's the point of having two separate functions ?

 * You say that end_*_request() are used to completely end a request, I
   suppose it's because they call __end_request() with
   rq->hard_nr_sectors << 9 (in the case of normal fs requests). But
   end_request() also does this, and my understanding is that a driver
   like drivers/block/z2ram.c only handles one segment per iteration
   (req->current_nr_sectors sectors) of the loop in do_z2_request(). But
   it uses end_request() at each iteration... which shouldn't completely
   end the request, but simply move to the next segment (changing
   rq->buffer, rq->sector, etc.). How does it work ?

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

--
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