[DRBD-user] [PATCH] In-flight operations counting for 2.6.32

Jan Yenya Kasprzak kas at fi.muni.cz
Thu Dec 3 16:28:59 CET 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Current drbd-8.3 git fails to compile against 2.6.32 because of
the way the number of in-flight requests is recorded. Use
part_inc_in_flight() instead.
---
 drbd/drbd_req.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drbd/drbd_req.c b/drbd/drbd_req.c
index 761f75d..1d830ae 100644
--- a/drbd/drbd_req.c
+++ b/drbd/drbd_req.c
@@ -60,8 +60,8 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
 	cpu = part_stat_lock();
 	part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
 	part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio));
+	part_inc_in_flight(&mdev->vdisk->part0, rw);
 	part_stat_unlock();
-	mdev->vdisk->part0.in_flight++;
 #endif
 }
 
@@ -82,8 +82,8 @@ static void _drbd_end_io_acct(struct drbd_conf *mdev, struct drbd_request *req)
 	cpu = part_stat_lock();
 	part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration);
 	part_round_stats(cpu, &mdev->vdisk->part0);
+	part_dec_in_flight(&mdev->vdisk->part0, rw);
 	part_stat_unlock();
-	mdev->vdisk->part0.in_flight--;
 #endif
 }
 
-- 
1.6.5.2


-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/    Journal: http://www.fi.muni.cz/~kas/blog/ |
Please don't top post and in particular don't attach entire digests to your
mail or we'll all soon be using bittorrent to read the list.     --Alan Cox



More information about the drbd-user mailing list