Whamcloud - gitweb
Update b1_4_smallfix from b1_4 (20040817_1834)
authoradilger <adilger>
Wed, 18 Aug 2004 09:30:20 +0000 (09:30 +0000)
committeradilger <adilger>
Wed, 18 Aug 2004 09:30:20 +0000 (09:30 +0000)
- direct IO reads on OST (4048)
- tune the read pipeline (3236)
- provide read-ahead stats and refine rpc in flight stats (3328)

lustre/include/linux/lustre_fsfilt.h

index 3b3db89..72aa750 100644 (file)
@@ -64,7 +64,7 @@ struct fsfilt_operations {
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
         int     (* fs_send_bio)(struct inode *inode, struct bio *bio);
 #else
-        int     (* fs_send_bio)(struct inode *inode, struct kiobuf *bio);
+        int     (* fs_send_bio)(int rw, struct inode *inode, struct kiobuf *bio);
 #endif
 
         /* methods for getting page from backing fs and putting page there
@@ -326,11 +326,16 @@ fsfilt_send_bio(struct obd_device *obd, struct inode *inode,
                 struct bio *bio)
 #else
 static inline int
-fsfilt_send_bio(struct obd_device *obd, struct inode *inode,
+fsfilt_send_bio(int rw, struct obd_device *obd, struct inode *inode,
                 struct kiobuf *bio)
 #endif
 {
-        return obd->obd_fsops->fs_send_bio(inode, bio);
+        LASSERTF(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ, "%x\n", rw);
+
+        if (rw == OBD_BRW_READ)
+                return obd->obd_fsops->fs_send_bio(READ, inode, bio);
+        else 
+                return obd->obd_fsops->fs_send_bio(WRITE, inode, bio); 
 }
 
 static inline int