提交 f497609e 编写于 作者: A Andreas Gruenbacher 提交者: Philipp Reisner

drbd: Get rid of MR_{READ,WRITE}_SHIFT

Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 823bd832
...@@ -368,8 +368,10 @@ void _tl_restart(struct drbd_tconn *tconn, enum drbd_req_event what) ...@@ -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); req = list_entry(le, struct drbd_request, tl_requests);
rv = _req_mod(req, what); rv = _req_mod(req, what);
n_writes += (rv & MR_WRITE) >> MR_WRITE_SHIFT; if (rv & MR_WRITE)
n_reads += (rv & MR_READ) >> MR_READ_SHIFT; n_writes++;
if (rv & MR_READ)
n_reads++;
} }
tmp = b->next; tmp = b->next;
......
...@@ -235,10 +235,8 @@ enum drbd_req_state_bits { ...@@ -235,10 +235,8 @@ enum drbd_req_state_bits {
/* For waking up the frozen transfer log mod_req() has to return if the request /* For waking up the frozen transfer log mod_req() has to return if the request
should be counted in the epoch object*/ should be counted in the epoch object*/
#define MR_WRITE_SHIFT 0 #define MR_WRITE 1
#define MR_WRITE (1 << MR_WRITE_SHIFT) #define MR_READ 2
#define MR_READ_SHIFT 1
#define MR_READ (1 << MR_READ_SHIFT)
static inline void drbd_req_make_private_bio(struct drbd_request *req, struct bio *bio_src) static inline void drbd_req_make_private_bio(struct drbd_request *req, struct bio *bio_src)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册