#include <linux/fs_struct.h>
#include <linux/namei.h>
+#include <linux/bio.h>
#include <lustre_patchless_compat.h>
return flag;
}
-#ifdef HAVE_VOID_MAKE_REQUEST_FN
-# define ll_mrf_ret void
-# define LL_MRF_RETURN(rc)
+#ifdef HAVE_QC_MAKE_REQUEST_FN
+# define ll_mrf_ret blk_qc_t
+# define LL_MRF_RETURN(rc) RETURN(BLK_QC_T_NONE)
#else
-# define ll_mrf_ret int
-# define LL_MRF_RETURN(rc) RETURN(rc)
+# ifdef HAVE_VOID_MAKE_REQUEST_FN
+# define ll_mrf_ret void
+# define LL_MRF_RETURN(rc)
+# else
+# define ll_mrf_ret int
+# define LL_MRF_RETURN(rc) RETURN(rc)
+# endif
#endif
#include <linux/fs.h>
security_inode_init_security(inode, dir, name, value, len)
#endif
+#ifndef bio_for_each_segment_all /* since kernel version 3.9 */
+#define bio_for_each_segment_all(bv, bio, it) bio_for_each_segment(bv, bio, it)
+#endif
+
#endif /* _LUSTRE_COMPAT_H */