Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346146
b: refs/heads/master
c: 615e087
h: refs/heads/master
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Nov 8, 2012
1 parent d5c7c92 commit 4b48897
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 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: 03d63e1d1e705fdba4c0f6a3a119cc42504bb9ed
refs/heads/master: 615e087fbd7483fafa28c8a1a4d1656251e0604d
32 changes: 20 additions & 12 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,22 +1096,30 @@ static void drbd_flush(struct drbd_tconn *tconn)
int vnr;

if (tconn->write_ordering >= WO_bdev_flush) {
rcu_read_lock();
idr_for_each_entry(&tconn->volumes, mdev, vnr) {
if (get_ldev(mdev)) {
rv = blkdev_issue_flush(mdev->ldev->backing_bdev, GFP_KERNEL,
NULL);
put_ldev(mdev);
if (!get_ldev(mdev))
continue;
kref_get(&mdev->kref);
rcu_read_unlock();

if (rv) {
dev_info(DEV, "local disk flush failed with status %d\n", rv);
/* would rather check on EOPNOTSUPP, but that is not reliable.
* don't try again for ANY return value != 0
* if (rv == -EOPNOTSUPP) */
drbd_bump_write_ordering(tconn, WO_drain_io);
break;
}
rv = blkdev_issue_flush(mdev->ldev->backing_bdev,
GFP_NOIO, NULL);
if (rv) {
dev_info(DEV, "local disk flush failed with status %d\n", rv);
/* would rather check on EOPNOTSUPP, but that is not reliable.
* don't try again for ANY return value != 0
* if (rv == -EOPNOTSUPP) */
drbd_bump_write_ordering(tconn, WO_drain_io);
}
put_ldev(mdev);
kref_put(&mdev->kref, &drbd_minor_destroy);

rcu_read_lock();
if (rv)
break;
}
rcu_read_unlock();
}
}

Expand Down

0 comments on commit 4b48897

Please sign in to comment.