struct lov_desc lod_desc;
/* use to protect ld_active_tgt_count and all ltd_active */
- cfs_spinlock_t lod_desc_lock;
+ spinlock_t lod_desc_lock;
/* list of known OSTs */
struct lod_ost_desc_idx *lod_ost_idx[OST_PTRS];
/* Table refcount used for delayed deletion */
int lod_refcount;
/* mutex to serialize concurrent updates to the ost table */
- cfs_mutex_t lod_mutex;
+ struct mutex lod_mutex;
/* read/write semaphore used for array relocation */
- cfs_rw_semaphore_t lod_rw_sem;
+ struct rw_semaphore lod_rw_sem;
/* QoS info per LOD */
struct lov_qos lod_qos; /* qos info per lod */
};
+struct lod_it {
+ struct dt_object *lit_obj; /* object from the layer below */
+ struct dt_it *lit_it; /* iterator from the layer below */
+};
+
struct lod_thread_info {
/* per-thread buffer for LOV EA */
void *lti_ea_store;
struct lu_fid lti_fid;
struct obd_statfs lti_osfs;
struct lu_attr lti_attr;
+ struct lod_it lti_it;
};
extern const struct lu_device_operations lod_lu_ops;
int lod_store_def_striping(const struct lu_env *env, struct dt_object *dt,
struct thandle *th);
int lod_verify_striping(struct lod_device *d, const struct lu_buf *buf, int specific);
+int lod_generate_and_set_lovea(const struct lu_env *env,
+ struct lod_object *mo, struct thandle *th);
/* lod_pool.c */
int lod_ost_pool_add(struct ost_pool *op, __u32 idx, unsigned int min_count);
int lod_pool_remove(struct obd_device *obd, char *poolname, char *ostname);
/* lod_qos.c */
+int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo,
+ struct lu_attr *attr, const struct lu_buf *buf,
+ struct thandle *th);
int qos_add_tgt(struct lod_device*, struct lod_ost_desc *);
int qos_del_tgt(struct lod_device *, struct lod_ost_desc *);
/* lproc_lod.c */
-extern struct file_operations lod_proc_target_fops;
void lprocfs_lod_init_vars(struct lprocfs_static_vars *lvars);
+int lod_procfs_init(struct lod_device *lod);
+void lod_procfs_fini(struct lod_device *lod);
/* lod_object.c */
int lod_object_set_pool(struct lod_object *o, char *pool);
+int lod_declare_striped_object(const struct lu_env *env, struct dt_object *dt,
+ struct lu_attr *attr,
+ const struct lu_buf *lovea, struct thandle *th);
+int lod_striping_create(const struct lu_env *env, struct dt_object *dt,
+ struct lu_attr *attr, struct dt_object_format *dof,
+ struct thandle *th);
+void lod_object_free_striping(const struct lu_env *env, struct lod_object *lo);
#endif