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

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

 



On Tue, Sep 02 2008, Thomas Petazzoni wrote:
> Le Tue, 2 Sep 2008 10:13:54 +0200,
> Jens Axboe <jens.axboe@xxxxxxxxxx> a écrit :
> 
> > They do act in the same way now, but that is because
> > end_that_request_last() automatically detects whether a request needs
> > to be dequeued or not.
> 
> Ok.
> 
> > end_request() uses hard_cur_sectors, so it does indeed only act on the
> > current segment of the request. end_*_request() act on the full
> > request, hard_nr_sectors.
> 
> Ok. Then, what's the difference between hard_cur_sectors and
> current_nr_sectors, then ?
> 
> Documentation/block/request.txt says:
> 
> unsigned long hard_nr_sectors   B       Used to keep sector sane
> unsigned long hard_nr_sectors   B       Used to keep nr_sectors sane
> unsigned int current_nr_sectors DB      Number of sectors in first
>                                         segment of request
> unsigned int hard_cur_sectors   B       Used to keep current_nr_sectors
>                                         sane
> 
> Which confuses me quite a lot.

The non hard_ variants can be modified by drivers (to increment a single
sector, or whatever they want), whereas the hard_ variants are updated
and maintain block layer internal state.

-- 
Jens Axboe


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