From f497609e4c50c6162b51359d560f2454b184e0ec Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Sun, 17 Jul 2011 23:06:12 +0200 Subject: [PATCH] drbd: Get rid of MR_{READ,WRITE}_SHIFT Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c | 6 ++++-- drivers/block/drbd/drbd_req.h | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index c941d3a..2090b78 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -368,8 +368,10 @@ void _tl_restart(struct drbd_tconn *tconn, enum drbd_req_event what) req = list_entry(le, struct drbd_request, tl_requests); rv = _req_mod(req, what); - n_writes += (rv & MR_WRITE) >> MR_WRITE_SHIFT; - n_reads += (rv & MR_READ) >> MR_READ_SHIFT; + if (rv & MR_WRITE) + n_writes++; + if (rv & MR_READ) + n_reads++; } tmp = b->next; diff --git a/drivers/block/drbd/drbd_req.h b/drivers/block/drbd/drbd_req.h index f6aff15..68f5405 100644 --- a/drivers/block/drbd/drbd_req.h +++ b/drivers/block/drbd/drbd_req.h @@ -235,10 +235,8 @@ enum drbd_req_state_bits { /* For waking up the frozen transfer log mod_req() has to return if the request should be counted in the epoch object*/ -#define MR_WRITE_SHIFT 0 -#define MR_WRITE (1 << MR_WRITE_SHIFT) -#define MR_READ_SHIFT 1 -#define MR_READ (1 << MR_READ_SHIFT) +#define MR_WRITE 1 +#define MR_READ 2 static inline void drbd_req_make_private_bio(struct drbd_request *req, struct bio *bio_src) { -- 2.7.4