Whamcloud - gitweb
b=15284
[fs/lustre-release.git] / lustre / include / lu_object.h
index 9c2f283..73fe7af 100644 (file)
@@ -156,6 +156,16 @@ struct lu_device_operations {
         int (*ldo_recovery_complete)(const struct lu_env *,
                                      struct lu_device *);
 
+        /**
+         * initialize local objects for device. this method called after layer has
+         * been initialized (after LCFG_SETUP stage) and before it starts serving
+         * user requests.
+         */
+
+        int (*ldo_prepare)(const struct lu_env *,
+                           struct lu_device *parent,
+                           struct lu_device *dev);
+
 };
 
 /**
@@ -895,12 +905,18 @@ static inline void lu_object_ref_del_at(struct lu_object *o,
         lu_ref_del_at(&o->lo_header->loh_reference, link, scope, source);
 }
 
+/** input params, should be filled out by mdt */
 struct lu_rdpg {
-        /* input params, should be filled out by mdt */
-        __u64                   rp_hash;        /* hash */
-        int                     rp_count;       /* count in bytes       */
-        int                     rp_npages;      /* number of pages      */
-        struct page           **rp_pages;       /* pointers to pages    */
+        /** hash */
+        __u64                   rp_hash;
+        /** count in bytes */
+        unsigned int            rp_count;
+        /** number of pages */
+        unsigned int            rp_npages;
+        /** requested attr */
+        __u32                   rp_attrs;
+        /** pointers to pages */
+        struct page           **rp_pages;
 };
 
 enum lu_xattr_flags {
@@ -1268,8 +1284,8 @@ int lu_site_stats_print(const struct lu_site *s, char *page, int count);
  * Common name structure to be passed around for various name related methods.
  */
 struct lu_name {
-        char    *ln_name;
-        int      ln_namelen;
+        const char    *ln_name;
+        int            ln_namelen;
 };
 
 /**
@@ -1279,6 +1295,7 @@ struct lu_name {
 struct lu_buf {
         void   *lb_buf;
         ssize_t lb_len;
+        int     lb_vmalloc:1;
 };
 
 /** null buffer */
@@ -1320,5 +1337,4 @@ int  lu_kmem_init(struct lu_kmem_descr *caches);
 void lu_kmem_fini(struct lu_kmem_descr *caches);
 
 /** @} lu */
-
 #endif /* __LUSTRE_LU_OBJECT_H */