#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 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;
/* 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.
*/
__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 *,
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: