Whamcloud - gitweb
LU-3963 obdclass: convert to linux list api
[fs/lustre-release.git] / lustre / include / dt_object.h
index 0f02ba2..acf22f5 100644 (file)
@@ -105,10 +105,10 @@ typedef void (*dt_cb_t)(struct lu_env *env, struct thandle *th,
 #define MAX_COMMIT_CB_STR_LEN  32
 
 struct dt_txn_commit_cb {
-       cfs_list_t      dcb_linkage;
-       dt_cb_t         dcb_func;
-       __u32           dcb_magic;
-       char            dcb_name[MAX_COMMIT_CB_STR_LEN];
+       struct list_head        dcb_linkage;
+       dt_cb_t                 dcb_func;
+       __u32                   dcb_magic;
+       char                    dcb_name[MAX_COMMIT_CB_STR_LEN];
 };
 
 /**
@@ -681,7 +681,7 @@ struct dt_device {
          * way, because callbacks are supposed to be added/deleted only during
          * single-threaded start-up shut-down procedures.
          */
-        cfs_list_t                         dd_txn_callbacks;
+       struct list_head                   dd_txn_callbacks;
        unsigned int                       dd_record_fid_accessed:1;
 };
 
@@ -711,7 +711,7 @@ struct dt_object {
  */
 struct local_oid_storage {
        /* all initialized llog systems on this node linked by this */
-       cfs_list_t        los_list;
+       struct list_head  los_list;
 
        /* how many handle's reference this los has */
        atomic_t          los_refcount;
@@ -840,9 +840,9 @@ struct dt_txn_callback {
         int (*dtc_txn_stop)(const struct lu_env *env,
                             struct thandle *txn, void *cookie);
         void (*dtc_txn_commit)(struct thandle *txn, void *cookie);
-        void                *dtc_cookie;
-        __u32                dtc_tag;
-        cfs_list_t           dtc_linkage;
+       void                    *dtc_cookie;
+       __u32                   dtc_tag;
+       struct list_head        dtc_linkage;
 };
 
 void dt_txn_callback_add(struct dt_device *dev, struct dt_txn_callback *cb);
@@ -1237,15 +1237,15 @@ static inline struct obd_capa *dt_capa_get(const struct lu_env *env,
 }
 
 static inline int dt_bufs_get(const struct lu_env *env, struct dt_object *d,
-                              struct niobuf_remote *rnb,
-                              struct niobuf_local *lnb, int rw,
-                              struct lustre_capa *capa)
+                             struct niobuf_remote *rnb,
+                             struct niobuf_local *lnb, int rw,
+                             struct lustre_capa *capa)
 {
-        LASSERT(d);
-        LASSERT(d->do_body_ops);
-        LASSERT(d->do_body_ops->dbo_bufs_get);
-        return d->do_body_ops->dbo_bufs_get(env, d, rnb->offset,
-                                            rnb->len, lnb, rw, capa);
+       LASSERT(d);
+       LASSERT(d->do_body_ops);
+       LASSERT(d->do_body_ops->dbo_bufs_get);
+       return d->do_body_ops->dbo_bufs_get(env, d, rnb->rnb_offset,
+                                           rnb->rnb_len, lnb, rw, capa);
 }
 
 static inline int dt_bufs_put(const struct lu_env *env, struct dt_object *d,
@@ -1547,6 +1547,20 @@ struct dt_find_hint {
        struct dt_object     *dfh_o;
 };
 
+struct dt_insert_rec {
+       union {
+               const struct lu_fid     *rec_fid;
+               void                    *rec_data;
+       };
+       union {
+               struct {
+                       __u32            rec_type;
+                       __u32            rec_padding;
+               };
+               __u64                    rec_misc;
+       };
+};
+
 struct dt_thread_info {
        char                     dti_buf[DT_MAX_PATH];
        struct dt_find_hint      dti_dfh;
@@ -1557,6 +1571,7 @@ struct dt_thread_info {
        struct lu_buf            dti_lb;
        struct lu_object_conf    dti_conf;
        loff_t                   dti_off;
+       struct dt_insert_rec     dti_dt_rec;
 };
 
 extern struct lu_context_key dt_key;