[DRBD-cvs] svn commit by lars - r2600 - trunk/drbd - move the EOPNOTSUPP for barriers to before the possible

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Thu Nov 16 12:47:42 CET 2006


Author: lars
Date: 2006-11-16 12:47:42 +0100 (Thu, 16 Nov 2006)
New Revision: 2600

Modified:
   trunk/drbd/drbd_req.c
Log:
move the EOPNOTSUPP for barriers to before the possible bio_split

Modified: trunk/drbd/drbd_req.c
===================================================================
--- trunk/drbd/drbd_req.c	2006-11-16 10:41:20 UTC (rev 2599)
+++ trunk/drbd/drbd_req.c	2006-11-16 11:47:42 UTC (rev 2600)
@@ -747,12 +747,6 @@
 	drbd_request_t *req;
 	int local, remote;
 
-	/* Currently our BARRIER code is disabled. */
-	if(unlikely(bio_barrier(bio))) {
-		bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
-		return 0;
-	}
-
 	/* allocate outside of all locks; get a "reference count" (ap_bio_cnt)
 	 * to avoid races with the disconnect/reconnect code.  */
 	inc_ap_bio(mdev);
@@ -1057,6 +1051,12 @@
 		return 0;
 	}
 
+	/* Currently our BARRIER code is disabled. */
+	if(unlikely(bio_barrier(bio))) {
+		bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
+		return 0;
+	}
+
 	/*
 	 * what we "blindly" assume:
 	 */



More information about the drbd-cvs mailing list