Hi, Le Thu, 15 Nov 2007 17:57:41 +0530, "Adil Mujeeb" <mujeeb.adil@xxxxxxxxx> a écrit : > I am not able to understand the meaning / usage of following members: A "struct request" potentially aggregates several "struct bio", which are stored in a linked-list available through the request->bio field. These "struct bio" are aggregated in a single "struct request" by the I/O scheduler, before the "struct request" is sent to the block device driver. > unsigned long nr_sectors : Number of sectors yet to be transferred in > the whole request According to the source code: /* no. of sectors left to submit */ So, it's the number of sectors in the whole "struct request" that still have to be submitted to the device. > unsigned int current_nr_sectors : Number of sectors in the current > segment of the current bio yet to be transferred According to the source code: /* no. of sectors left to submit in the current segment */ So, it's the number of sectors in the current bio that still have to be submitted to the device. > unsigned long hard_nr_sectors : Number of sectors yet to be > transferred in the whole request (updated by the generic block layer) According to the source code: /* no. of sectors left to complete */ So, it's the number of sectors in the whole "struct request" for which we must receive a completion before finishing handling of the whole "struct request". > unsigned int hard_cur_sectors : Number of sectors in the current > segment of the current bio yet to be transferred (updated by the > generic block layer) According to the source code: /* no. of sectors left to complete in the current segment */ Same thing as "hard_nr_sectors", but only for the current bio being handled. Of course, it would be nice if a block device expert could confirm or infirm these informations. Sincerly, Thomas -- PETAZZONI Thomas - thomas.petazzoni@xxxxxxxx http://{thomas,sos,kos}.enix.org - Jabber: thomas.petazzoni@xxxxxxxxx http://{agenda,livret}dulibre.org - http://www.toulibre.org Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7
Attachment:
signature.asc
Description: PGP signature