struct osc_async_rc {
int ar_rc;
int ar_force_sync;
- int ar_min_xid;
+ __u64 ar_min_xid;
};
struct lov_oinfo { /* per-stripe data structure */
struct lustre_quota_ctxt obt_qctxt;
};
+typedef void (*obd_pin_extent_cb)(void *data);
+typedef int (*obd_page_removal_cb_t)(void *data, int discard);
+typedef int (*obd_lock_cancel_cb)(struct ldlm_lock *,struct ldlm_lock_desc *,
+ void *, int);
+
/* llog contexts */
enum llog_ctxt_id {
LLOG_CONFIG_ORIG_CTXT = 0,
struct mdc_rpc_lock;
struct obd_import;
+struct lustre_cache;
struct client_obd {
- struct semaphore cl_sem;
+ struct rw_semaphore cl_sem;
struct obd_uuid cl_target_uuid;
struct obd_import *cl_import; /* ptlrpc connection state */
int cl_conn_count;
struct lu_client_seq *cl_seq;
atomic_t cl_resends; /* resend count */
+
+ /* Cache of triples */
+ struct lustre_cache *cl_cache;
+ obd_lock_cancel_cb cl_ext_lock_cancel_cb;
};
#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
/* for capability keys update */
struct lustre_capa_key *mds_capa_keys;
+ struct rw_semaphore mds_notify_lock;
};
/* lov objid */
__u32 lov_offset_idx; /* aliasing for start_idx */
int lov_start_count;/* reseed counter */
int lov_connects;
+ obd_page_removal_cb_t lov_page_removal_cb;
+ obd_pin_extent_cb lov_page_pin_cb;
+ obd_lock_cancel_cb lov_lock_cancel_cb;
};
struct lmv_tgt_desc {
cfs_waitq_t olg_waitq;
spinlock_t olg_lock;
struct obd_export *olg_exp;
+ int olg_initializing;
};
/* corresponds to one of the obd's */
spinlock_t obd_uncommitted_replies_lock;
cfs_timer_t obd_recovery_timer;
time_t obd_recovery_start; /* seconds */
- time_t obd_recovery_end; /* seconds */
+ 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;
struct lprocfs_stats *obd_svc_stats;
atomic_t obd_evict_inprogress;
cfs_waitq_t obd_evict_inprogress_waitq;
+
+ /**
+ * Ldlm pool part. Save last calculated SLV and Limit.
+ */
+ rwlock_t obd_pool_lock;
+ int obd_pool_limit;
+ __u64 obd_pool_slv;
};
#define OBD_OPT_FORCE 0x0001
enum obd_cleanup_stage {
/* Special case hack for MDS LOVs */
OBD_CLEANUP_EARLY,
-/* Precleanup stage 1, we must make sure all exports (other than the
- self-export) get destroyed. */
+/* can be directly mapped to .ldto_device_fini() */
OBD_CLEANUP_EXPORTS,
-/* Precleanup stage 2, do other type-specific cleanup requiring the
- self-export. */
- OBD_CLEANUP_SELF_EXP,
-/* FIXME we should eliminate the "precleanup" function and make them stages
- of the "cleanup" function. */
- OBD_CLEANUP_OBD,
};
/* get/set_info keys */
#define KEY_REVIMP_UPD "revimp_update"
#define KEY_LOV_IDX "lov_idx"
#define KEY_LAST_ID "last_id"
+#define KEY_READONLY "read-only"
#define KEY_LOCK_TO_STRIPE "lock_to_stripe"
+#define KEY_CHECKSUM "checksum"
+#define KEY_UNLINKED "unlinked"
+#define KEY_EVICT_BY_NID "evict_by_nid"
+#define KEY_REGISTER_TARGET "register_target"
+#define KEY_SET_FS "set_fs"
+#define KEY_CLEAR_FS "clear_fs"
#define KEY_BLOCKSIZE "blocksize"
#define KEY_BLOCKSIZE_BITS "blocksize_bits"
+/* XXX unused ?*/
+#define KEY_INTERMDS "inter_mds"
+#define KEY_ASYNC "async"
struct lu_context;
struct lov_oinfo *loi,
cfs_page_t *page, obd_off offset,
struct obd_async_page_ops *ops, void *data,
- void **res);
+ void **res, int nocache,
+ struct lustre_handle *lockh);
+ int (*o_reget_short_lock)(struct obd_export *exp,
+ struct lov_stripe_md *lsm,
+ void **res, int rw,
+ obd_off start, obd_off end,
+ void **cookie);
+ int (*o_release_short_lock)(struct obd_export *exp,
+ struct lov_stripe_md *lsm, obd_off end,
+ void *cookie, int rw);
int (*o_queue_async_io)(struct obd_export *exp,
struct lov_stripe_md *lsm,
struct lov_oinfo *loi, void *cookie,
int cmd, obd_off *);
/* llog related obd_methods */
- int (*o_llog_init)(struct obd_device *obd, int group,
+ int (*o_llog_init)(struct obd_device *obd, struct obd_llog_group *grp,
struct obd_device *disk_obd, int count,
struct llog_catid *logid, struct obd_uuid *uuid);
int (*o_llog_finish)(struct obd_device *obd, int count);
int (*o_quotactl)(struct obd_export *, struct obd_quotactl *);
int (*o_ping)(struct obd_export *exp);
+
+ int (*o_register_page_removal_cb)(struct obd_export *exp,
+ obd_page_removal_cb_t cb,
+ obd_pin_extent_cb pin_cb);
+ int (*o_unregister_page_removal_cb)(struct obd_export *exp,
+ obd_page_removal_cb_t cb);
+ int (*o_register_lock_cancel_cb)(struct obd_export *exp,
+ obd_lock_cancel_cb cb);
+ int (*o_unregister_lock_cancel_cb)(struct obd_export *exp,
+ obd_lock_cancel_cb cb);
+
/*
* NOTE: If adding ops, add another LPROCFS_OBD_OP_INIT() line
* to lprocfs_alloc_obd_stats() in obdclass/lprocfs_status.c.
obd->obd_name, transno, error);
return;
}
- CDEBUG(D_HA, "%s: transno "LPU64" committed\n",
- obd->obd_name, transno);
if (transno > obd->obd_last_committed) {
+ CDEBUG(D_HA, "%s: transno "LPD64" committed\n",
+ obd->obd_name, transno);
obd->obd_last_committed = transno;
ptlrpc_commit_replies (obd);
+ } else {
+ CDEBUG(D_INFO, "%s: transno "LPD64" committed\n",
+ obd->obd_name, transno);
}
}