|
@@ -123,7 +123,14 @@ void drbd_req_destroy(struct kref *kref)
|
|
|
* (local only or remote failed).
|
|
|
* Other places where we set out-of-sync:
|
|
|
* READ with local io-error */
|
|
|
- if (!(s & RQ_POSTPONED)) {
|
|
|
+
|
|
|
+ /* There is a special case:
|
|
|
+ * we may notice late that IO was suspended,
|
|
|
+ * and postpone, or schedule for retry, a write,
|
|
|
+ * before it even was submitted or sent.
|
|
|
+ * In that case we do not want to touch the bitmap at all.
|
|
|
+ */
|
|
|
+ if ((s & (RQ_POSTPONED|RQ_LOCAL_MASK|RQ_NET_MASK)) != RQ_POSTPONED) {
|
|
|
if (!(s & RQ_NET_OK) || !(s & RQ_LOCAL_OK))
|
|
|
drbd_set_out_of_sync(mdev, req->i.sector, req->i.size);
|
|
|
|