Whamcloud - gitweb
LU-8066 obd_type: discard obd_types linked list.
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_internal.h
index 8b62608..fe9c8f0 100644 (file)
@@ -55,7 +55,7 @@
 
 /* LUSTRE_OSD_NAME */
 #include <obd.h>
-/* class_register_type(), class_unregister_type(), class_get_type() */
+/* class_register_type(), class_unregister_type() */
 #include <obd_class.h>
 #include <lustre_disk.h>
 #include <dt_object.h>
@@ -797,10 +797,11 @@ int osd_oii_lookup(struct osd_device *dev, const struct lu_fid *fid,
                   struct osd_inode_id *id);
 void osd_scrub_dump(struct seq_file *m, struct osd_device *dev);
 
-struct dentry *osd_lookup_one_len_unlocked(const char *name,
+struct dentry *osd_lookup_one_len_unlocked(struct osd_device *dev,
+                                          const char *name,
                                           struct dentry *base, int len);
-struct dentry *osd_ios_lookup_one_len(const char *name, struct dentry *base,
-                                     int len);
+struct dentry *osd_lookup_one_len(struct osd_device *dev, const char *name,
+                                 struct dentry *base, int len);
 
 int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
                   u64 seq, struct lu_seq_range *range);
@@ -1533,4 +1534,10 @@ static inline bool bio_integrity_prep_fn(struct bio *bio,
 }
 #endif
 
+#ifdef HAVE_BIO_BI_PHYS_SEGMENTS
+#define osd_bio_nr_segs(bio)           ((bio)->bi_phys_segments)
+#else
+#define osd_bio_nr_segs(bio)           bio_segments((bio))
+#endif /* HAVE_BIO_BI_PHYS_SEGMENTS */
+
 #endif /* _OSD_INTERNAL_H */