-struct lod_qos {
- struct list_head lq_oss_list;
- struct rw_semaphore lq_rw_sem;
- __u32 lq_active_oss_count;
- unsigned int lq_prio_free; /* priority for free space */
- unsigned int lq_threshold_rr;/* priority for rr */
- struct lod_qos_rr lq_rr; /* round robin qos data */
- bool lq_dirty:1, /* recalc qos data */
- lq_same_space:1,/* the ost's all have approx.
- the same space avail */
- lq_reset:1; /* zero current penalties */
-};
-
-struct lod_qos_oss {
- struct obd_uuid lqo_uuid; /* ptlrpc's c_remote_uuid */
- struct list_head lqo_oss_list; /* link to lov_qos */
- __u64 lqo_bavail; /* total bytes avail on OSS */
- __u64 lqo_penalty; /* current penalty */
- __u64 lqo_penalty_per_obj; /* penalty decrease
- every obj*/
- time_t lqo_used; /* last used time, seconds */
- __u32 lqo_ost_count; /* number of osts on this oss */
-};
-
-struct ltd_qos {
- struct lod_qos_oss *ltq_oss; /* oss info */
- __u64 ltq_penalty; /* current penalty */
- __u64 ltq_penalty_per_obj; /* penalty decrease
- every obj*/
- __u64 ltq_weight; /* net weighting */
- time_t ltq_used; /* last used time, seconds */
- bool ltq_usable:1; /* usable for striping */
-};
-
-struct lod_tgt_desc {
- struct dt_device *ltd_tgt;
- struct list_head ltd_kill;
- struct obd_export *ltd_exp;
- struct obd_uuid ltd_uuid;
- __u32 ltd_gen;
- __u32 ltd_index;
- struct ltd_qos ltd_qos; /* qos info per target */
- struct obd_statfs ltd_statfs;
- struct ptlrpc_thread *ltd_recovery_thread;
- unsigned long ltd_active:1,/* is this target up for requests */
- ltd_activate:1,/* should target be activated */
- ltd_reap:1, /* should this target be deleted */
- ltd_got_update_log:1, /* Already got update log */
- ltd_connecting:1; /* target is connecting */
-};
-
-#define TGT_PTRS 256 /* number of pointers at 1st level */
-#define TGT_PTRS_PER_BLOCK 256 /* number of pointers at 2nd level */
-
-struct lod_tgt_desc_idx {
- struct lod_tgt_desc *ldi_tgt[TGT_PTRS_PER_BLOCK];
-};
-
-#define LTD_TGT(ltd, index) \
- ((ltd)->ltd_tgt_idx[(index) / \
- TGT_PTRS_PER_BLOCK]->ldi_tgt[(index) % TGT_PTRS_PER_BLOCK])