#include <lustre/lustre_idl.h>
#include <lu_object.h>
+#include <lu_ref.h>
#include <lustre_lib.h>
#include <lustre_export.h>
#include <lustre_quota.h>
struct osc_async_rc loi_ar;
};
+static inline void loi_kms_set(struct lov_oinfo *oinfo, __u64 kms)
+{
+ oinfo->loi_kms = kms;
+ oinfo->loi_kms_valid = 1;
+}
+
static inline void loi_init(struct lov_oinfo *loi)
{
CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_pending);
__u32 lw_stripe_size; /* size of the stripe */
__u32 lw_pattern; /* striping pattern (RAID0, RAID1) */
unsigned lw_stripe_count; /* number of objects being striped over */
- char lw_pool_name[MAXPOOLNAME]; /* pool name */
+ char lw_pool_name[LOV_MAXPOOLNAME]; /* pool name */
} lsm_wire;
struct lov_array_info *lsm_array; /*Only for joined file array info*/
obd_size fo_tot_pending;
obd_size fo_readcache_max_filesize;
+ int fo_read_cache;
+ int fo_writethrough_cache;
struct obd_import *fo_mdc_imp;
struct obd_uuid fo_mdc_uuid;
__u32 cl_supp_cksum_types;
/* checksum algorithm to be used */
cksum_type_t cl_cksum_type;
-
+
/* also protected by the poorly named _loi_list_lock lock above */
struct osc_async_rc cl_ar;
#define pool_tgt(_p, _i) _p->pool_lov->lov_tgts[_p->pool_obds.op_array[_i]]
struct pool_desc {
- char pool_name[MAXPOOLNAME + 1]; /* name of pool */
- struct ost_pool pool_obds; /* pool members */
- struct lov_qos_rr pool_rr; /* round robin qos */
- struct hlist_node pool_hash; /* access by poolname */
- struct list_head pool_list; /* serial access */
- cfs_proc_dir_entry_t *pool_proc_entry; /* file in /proc */
- struct lov_obd *pool_lov; /* lov obd to which this
- pool belong */
+ char pool_name[LOV_MAXPOOLNAME + 1]; /* name of pool */
+ struct ost_pool pool_obds; /* pool members */
+ struct lov_qos_rr pool_rr; /* round robin qos */
+ struct hlist_node pool_hash; /* access by poolname */
+ struct list_head pool_list; /* serial access */
+ cfs_proc_dir_entry_t *pool_proc_entry; /* file in /proc */
+ struct lov_obd *pool_lov; /* lov obd to which this
+ pool belong */
};
struct lov_obd {
struct semaphore ltd_fid_sem;
};
+enum placement_policy {
+ PLACEMENT_CHAR_POLICY = 0,
+ PLACEMENT_NID_POLICY = 1,
+ PLACEMENT_INVAL_POLICY = 2,
+ PLACEMENT_MAX_POLICY
+};
+
+typedef enum placement_policy placement_policy_t;
+
struct lmv_obd {
int refcount;
struct lu_client_fld lmv_fld;
spinlock_t lmv_lock;
+ placement_policy_t lmv_placement;
struct lmv_desc desc;
struct obd_uuid cluuid;
struct obd_export *exp;
struct completion trd_finishing;
};
-#define OBD_LLOG_GROUP 0
-
enum filter_groups {
FILTER_GROUP_LLOG = 1,
FILTER_GROUP_ECHO,
spinlock_t olg_lock;
struct obd_export *olg_exp;
int olg_initializing;
+ struct semaphore olg_cat_processing;
};
/* corresponds to one of the obd's */
/* XXX encapsulate all this recovery data into one struct */
svc_handler_t obd_recovery_handler;
pid_t obd_processing_task;
-
+
int obd_max_recoverable_clients;
int obd_connected_clients;
int obd_recoverable_clients;
time_t obd_recovery_end; /* seconds, for lprocfs_status */
time_t obd_recovery_max_time; /* seconds, bz13079 */
int obd_recovery_timeout;
-
+
/* new recovery stuff from CMD2 */
struct target_recovery_data obd_recovery_data;
int obd_replayed_locks;
atomic_t obd_evict_inprogress;
cfs_waitq_t obd_evict_inprogress_waitq;
- /**
- * Ldlm pool part. Save last calculated SLV and Limit.
+ /**
+ * Ldlm pool part. Save last calculated SLV and Limit.
*/
rwlock_t obd_pool_lock;
int obd_pool_limit;
__u64 obd_pool_slv;
+
+ /**
+ * A list of outstanding class_incref()'s against this obd. For
+ * debugging.
+ */
+ struct lu_ref obd_reference;
};
#define OBD_OPT_FORCE 0x0001
return LCK_CW;
else if (it->it_op & (IT_READDIR | IT_GETATTR | IT_OPEN | IT_LOOKUP))
return LCK_CR;
-
+
LASSERTF(0, "Invalid it_op: %d\n", it->it_op);
return -EINVAL;
}
int (*o_reconnect)(const struct lu_env *env,
struct obd_export *exp, struct obd_device *src,
struct obd_uuid *cluuid,
- struct obd_connect_data *ocd);
+ struct obd_connect_data *ocd,
+ void *localdata);
int (*o_disconnect)(struct obd_export *exp);
/* Initialize/finalize fids infrastructure. */
int (*o_fid_alloc)(struct obd_export *exp, struct lu_fid *fid,
struct md_op_data *op_data);
- /*
+ /*
* Object with @fid is getting deleted, we may want to do something
* about this.
*/
obd_id *startid, obd_gr group, void *data);
int (*o_preprw)(int cmd, struct obd_export *exp, struct obdo *oa,
int objcount, struct obd_ioobj *obj,
- int niocount, struct niobuf_remote *remote,
- struct niobuf_local *local, struct obd_trans_info *oti,
+ struct niobuf_remote *remote, int *nr_pages,
+ struct niobuf_local *local,
+ struct obd_trans_info *oti,
struct lustre_capa *capa);
int (*o_commitrw)(int cmd, struct obd_export *exp, struct obdo *oa,
int objcount, struct obd_ioobj *obj,
- int niocount, struct niobuf_local *local,
+ struct niobuf_remote *remote, int pages,
+ struct niobuf_local *local,
struct obd_trans_info *oti, int rc);
int (*o_enqueue)(struct obd_export *, struct obd_info *oinfo,
struct ldlm_enqueue_info *einfo,
__u32 mode, struct lustre_handle *);
int (*o_cancel_unused)(struct obd_export *, struct lov_stripe_md *,
int flags, void *opaque);
- int (*o_join_lru)(struct obd_export *, struct lov_stripe_md *,
- int join);
int (*o_init_export)(struct obd_export *exp);
int (*o_destroy_export)(struct obd_export *exp);
int (*o_extent_calc)(struct obd_export *, struct lov_stripe_md *,
#define MAX_HASH_SIZE_32 0x7fffffffUL
#define MAX_HASH_SIZE 0x7fffffffffffffffULL
-#define MAX_HASH_HIGHEST_BIT 0x1000000000000000
+#define MAX_HASH_HIGHEST_BIT 0x1000000000000000ULL
struct lustre_md {
struct mdt_body *body;
struct lov_mds_md *lmm);
};
-extern struct lsm_operations lsm_v1_ops;
-extern struct lsm_operations lsm_join_ops;
-extern struct lsm_operations lsm_v3_ops;
-static inline struct lsm_operations *lsm_op_find(int magic)
+extern const struct lsm_operations lsm_v1_ops;
+extern const struct lsm_operations lsm_join_ops;
+extern const struct lsm_operations lsm_v3_ops;
+static inline const struct lsm_operations *lsm_op_find(int magic)
{
switch(magic) {
case LOV_MAGIC_V1: