Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346121
b: refs/heads/master
c: f497609
h: refs/heads/master
i:
  346119: 5fd5d6d
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 8a1e0ca commit cb88c72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 823bd832a60dcf4bf9c162112f34f2f1783d0eaa
refs/heads/master: f497609e4c50c6162b51359d560f2454b184e0ec
6 changes: 4 additions & 2 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/block/drbd/drbd_req.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit cb88c72

Please sign in to comment.