Whamcloud - gitweb
LU-2642 osd-ldiskfs: Use __REQ_WRITE instead of BIO_RW.
authorJeff Mahoney <jeffm@suse.com>
Fri, 18 Jan 2013 08:21:55 +0000 (03:21 -0500)
committerAndreas Dilger <andreas.dilger@intel.com>
Wed, 20 Feb 2013 07:39:04 +0000 (02:39 -0500)
Commit 7b6d91da removed BIO_RW and replaced it with __REQ_WRITE.
(v2.6.35)

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I33f87d1e7d8ffe90efcd8b173ad56d9ecf723d7a
Reviewed-on: http://review.whamcloud.com/5121
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/osd-ldiskfs/osd_io.c

index 38ea533..dac9d00 100644 (file)
@@ -137,6 +137,10 @@ void osd_fini_iobuf(struct osd_device *d, struct osd_iobuf *iobuf)
         }
 }
 
+#ifndef __REQ_WRITE /* pre-2.6.35 */
+#define __REQ_WRITE BIO_RW
+#endif
+
 #ifdef HAVE_BIO_ENDIO_2ARG
 #define DIO_RETURN(a)
 static void dio_complete_routine(struct bio *bio, int error)
@@ -171,7 +175,7 @@ static int dio_complete_routine(struct bio *bio, unsigned int done, int error)
         }
 
         /* the check is outside of the cycle for performance reason -bzzz */
-       if (!test_bit(BIO_RW, &bio->bi_rw)) {
+       if (!test_bit(__REQ_WRITE, &bio->bi_rw)) {
                 bio_for_each_segment(bvl, bio, i) {
                         if (likely(error == 0))
                                 SetPageUptodate(bvl->bv_page);