drbd: account bitmap IO during resync as resync-(related-)-io
authorLars Ellenberg <lars.ellenberg@linbit.com>
Tue, 14 Jun 2011 12:18:23 +0000 (14:18 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 30 Jun 2011 07:23:43 +0000 (09:23 +0200)
If we have a good resync rate, we will frequently update the on-disk
bitmap, which, if not accounted for as resync io, may let an otherwise
idle device appear to be "busy", and cause us to throttle resync.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_bitmap.c

index 61f4fae9f67e2ba0d50febff7b0311597f463764..7b976296b564faeed6a676afb22119bb99500174 100644 (file)
@@ -991,6 +991,9 @@ static void bm_page_io_async(struct bm_aio_ctx *ctx, int page_nr, int rw) __must
                bio_endio(bio, -EIO);
        } else {
                submit_bio(rw, bio);
+               /* this should not count as user activity and cause the
+                * resync to throttle -- see drbd_rs_should_slow_down(). */
+               atomic_add(len >> 9, &mdev->rs_sect_ev);
        }
 }