-/* Moved to lustre_user.h
-#define IOC_MDC_LOOKUP _IOWR(IOC_MDC_TYPE, 20, struct obd_ioctl_data *)
-#define IOC_MDC_GETSTRIPE _IOWR(IOC_MDC_TYPE, 21, struct lov_mds_md *) */
int loi_ost_idx; /* OST stripe index in lov_tgt_desc->tgts */
int loi_ost_gen; /* generation of this loi_ost_idx */
int loi_ost_idx; /* OST stripe index in lov_tgt_desc->tgts */
int loi_ost_gen; /* generation of this loi_ost_idx */
cfs_list_t loi_hp_ready_item;
cfs_list_t loi_write_item;
cfs_list_t loi_read_item;
cfs_list_t loi_hp_ready_item;
cfs_list_t loi_write_item;
cfs_list_t loi_read_item;
unsigned long loi_kms_valid:1;
__u64 loi_kms; /* known minimum size */
struct ost_lvb loi_lvb;
struct osc_async_rc loi_ar;
};
unsigned long loi_kms_valid:1;
__u64 loi_kms; /* known minimum size */
struct ost_lvb loi_lvb;
struct osc_async_rc loi_ar;
};
CFS_INIT_LIST_HEAD(&loi->loi_hp_ready_item);
CFS_INIT_LIST_HEAD(&loi->loi_write_item);
CFS_INIT_LIST_HEAD(&loi->loi_read_item);
CFS_INIT_LIST_HEAD(&loi->loi_hp_ready_item);
CFS_INIT_LIST_HEAD(&loi->loi_write_item);
CFS_INIT_LIST_HEAD(&loi->loi_read_item);
__u64 lw_maxbytes; /* maximum possible file size */
/* LOV-private members start here -- only for use in lov/. */
__u64 lw_maxbytes; /* maximum possible file size */
/* LOV-private members start here -- only for use in lov/. */
#define lsm_maxbytes lsm_wire.lw_maxbytes
#define lsm_magic lsm_wire.lw_magic
#define lsm_stripe_size lsm_wire.lw_stripe_size
#define lsm_maxbytes lsm_wire.lw_maxbytes
#define lsm_magic lsm_wire.lw_magic
#define lsm_stripe_size lsm_wire.lw_stripe_size
/* obd info for a particular level (lov, osc). */
struct obd_info {
/* Lock policy. It keeps an extent which is specific for a particular
/* obd info for a particular level (lov, osc). */
struct obd_info {
/* Lock policy. It keeps an extent which is specific for a particular
int fo_read_cache:1, /**< enable read-only cache */
fo_writethrough_cache:1,/**< read cache writes */
fo_mds_ost_sync:1, /**< MDS-OST orphan recovery*/
int fo_read_cache:1, /**< enable read-only cache */
fo_writethrough_cache:1,/**< read cache writes */
fo_mds_ost_sync:1, /**< MDS-OST orphan recovery*/
#define OSC_MAX_DIRTY_MB_MAX 2048 /* arbitrary, but < MAX_LONG bytes */
#define OSC_DEFAULT_RESENDS 10
#define OSC_MAX_DIRTY_MB_MAX 2048 /* arbitrary, but < MAX_LONG bytes */
#define OSC_DEFAULT_RESENDS 10
+/* possible values for fo_sync_lock_cancel */
+enum {
+ NEVER_SYNC_ON_CANCEL = 0,
+ BLOCKING_SYNC_ON_CANCEL = 1,
+ ALWAYS_SYNC_ON_CANCEL = 2,
+ NUM_SYNC_ON_CANCEL_STATES
+};
+
cfs_list_t cl_loi_hp_ready_list;
cfs_list_t cl_loi_write_list;
cfs_list_t cl_loi_read_list;
cfs_list_t cl_loi_hp_ready_list;
cfs_list_t cl_loi_write_list;
cfs_list_t cl_loi_read_list;
#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
#define CL_NOT_QUOTACHECKED 1 /* client->cl_qchk_stat init value */
struct mgs_obd {
#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
#define CL_NOT_QUOTACHECKED 1 /* client->cl_qchk_stat init value */
struct mgs_obd {
struct ptlrpc_service *mgs_service;
struct vfsmount *mgs_vfsmnt;
struct super_block *mgs_sb;
struct ptlrpc_service *mgs_service;
struct vfsmount *mgs_vfsmnt;
struct super_block *mgs_sb;
cfs_dentry_t *mds_logs_dir;
cfs_dentry_t *mds_objects_dir;
struct llog_handle *mds_cfg_llh;
cfs_dentry_t *mds_logs_dir;
cfs_dentry_t *mds_objects_dir;
struct llog_handle *mds_cfg_llh;
#define LUSTRE_VVP_NAME "vvp"
#define LUSTRE_LMV_NAME "lmv"
#define LUSTRE_CMM_MDC_NAME "cmm-mdc"
#define LUSTRE_VVP_NAME "vvp"
#define LUSTRE_LMV_NAME "lmv"
#define LUSTRE_CMM_MDC_NAME "cmm-mdc"
/**
* In HEAD for CMD, the object is created in group number which is 3>=
* or indexing starts from 3. To test this assertions are added to disallow
/**
* In HEAD for CMD, the object is created in group number which is 3>=
* or indexing starts from 3. To test this assertions are added to disallow
-static inline int filter_group_is_mds(obd_gr group)
-{
- return (group == FILTER_GROUP_MDS0 ||
- group >= FILTER_GROUP_MDS1_N_BASE);
-}
-
-#define LASSERT_MDS_GROUP(group) LASSERT(filter_group_is_mds(group))
+#define LASSERT_SEQ_IS_MDT(seq) LASSERT(fid_seq_is_mdt(seq))
-static inline __u64 obdo_mdsno(struct obdo *oa)
-{
- LASSERT((oa->o_valid & OBD_MD_FLGROUP));
- return objgrp_to_mdsno(oa->o_gr);
-}
-
-static inline int obdo_is_mds(struct obdo *oa)
-{
- LASSERT(oa->o_valid & OBD_MD_FLGROUP);
- return filter_group_is_mds(oa->o_gr);
-}
-
unsigned long obd_attached:1, /* finished attach */
obd_set_up:1, /* finished setup */
obd_recovering:1, /* there are recoverable clients */
obd_abort_recovery:1,/* recovery expired */
obd_version_recov:1, /* obd uses version checking */
unsigned long obd_attached:1, /* finished attach */
obd_set_up:1, /* finished setup */
obd_recovering:1, /* there are recoverable clients */
obd_abort_recovery:1,/* recovery expired */
obd_version_recov:1, /* obd uses version checking */
obd_replayable:1, /* recovery is enabled; inform clients */
obd_no_transno:1, /* no committed-transno notification */
obd_no_recov:1, /* fail instead of retry messages */
obd_replayable:1, /* recovery is enabled; inform clients */
obd_no_transno:1, /* no committed-transno notification */
obd_no_recov:1, /* fail instead of retry messages */
obd_stopping:1, /* started cleanup */
obd_starting:1, /* started setup */
obd_force:1, /* cleanup with > 0 obd refcount */
obd_stopping:1, /* started cleanup */
obd_starting:1, /* started setup */
obd_force:1, /* cleanup with > 0 obd refcount */
obd_inactive:1, /* device active/inactive
* (for /proc/status only!!) */
obd_process_conf:1; /* device is processing mgs config */
obd_inactive:1, /* device active/inactive
* (for /proc/status only!!) */
obd_process_conf:1; /* device is processing mgs config */
/* uuid-export hash body */
cfs_hash_t *obd_uuid_hash;
/* nid-export hash body */
/* uuid-export hash body */
cfs_hash_t *obd_uuid_hash;
/* nid-export hash body */
struct ldlm_namespace *obd_namespace;
struct ptlrpc_client obd_ldlm_client; /* XXX OST/MDS only */
/* a spinlock is OK for what we do now, may need a semaphore later */
struct ldlm_namespace *obd_namespace;
struct ptlrpc_client obd_ldlm_client; /* XXX OST/MDS only */
/* a spinlock is OK for what we do now, may need a semaphore later */
cfs_semaphore_t obd_dev_sem;
__u64 obd_last_committed;
struct fsfilt_operations *obd_fsops;
cfs_semaphore_t obd_dev_sem;
__u64 obd_last_committed;
struct fsfilt_operations *obd_fsops;
- cfs_spinlock_t obd_processing_task_lock; /* BH lock (timer) */
+ /* this lock protects all recovery list_heads, timer and
+ * obd_next_recovery_transno value */
+ cfs_spinlock_t obd_recovery_task_lock;
__u64 obd_next_recovery_transno;
int obd_replayed_requests;
int obd_requests_queued_for_recovery;
cfs_waitq_t obd_next_transno_waitq;
__u64 obd_next_recovery_transno;
int obd_replayed_requests;
int obd_requests_queued_for_recovery;
cfs_waitq_t obd_next_transno_waitq;
cfs_timer_t obd_recovery_timer;
time_t obd_recovery_start; /* seconds */
time_t obd_recovery_end; /* seconds, for lprocfs_status */
cfs_timer_t obd_recovery_timer;
time_t obd_recovery_start; /* seconds */
time_t obd_recovery_end; /* seconds, for lprocfs_status */
cfs_list_t obd_req_replay_queue;
cfs_list_t obd_lock_replay_queue;
cfs_list_t obd_final_req_queue;
cfs_list_t obd_req_replay_queue;
cfs_list_t obd_lock_replay_queue;
cfs_list_t obd_final_req_queue;
#define KEY_SET_FS "set_fs"
/* KEY_SET_INFO in lustre_idl.h */
#define KEY_SPTLRPC_CONF "sptlrpc_conf"
#define KEY_SET_FS "set_fs"
/* KEY_SET_INFO in lustre_idl.h */
#define KEY_SPTLRPC_CONF "sptlrpc_conf"
struct lu_fid op_fid4; /* to the operation locks. */
mdsno_t op_mds; /* what mds server open will go to */
struct lustre_handle op_handle;
struct lu_fid op_fid4; /* to the operation locks. */
mdsno_t op_mds; /* what mds server open will go to */
struct lustre_handle op_handle;
struct lustre_handle *srconn, struct lov_stripe_md *src,
obd_size start, obd_size end, struct obd_trans_info *);
int (*o_iterate)(struct lustre_handle *conn,
struct lustre_handle *srconn, struct lov_stripe_md *src,
obd_size start, obd_size end, struct obd_trans_info *);
int (*o_iterate)(struct lustre_handle *conn,
- int (*)(obd_id, obd_gr, void *),
- obd_id *startid, obd_gr group, void *data);
+ int (*)(obd_id, obd_seq, void *),
+ obd_id *startid, obd_seq seq, void *data);
int (*o_preprw)(int cmd, struct obd_export *exp, struct obdo *oa,
int objcount, struct obd_ioobj *obj,
struct niobuf_remote *remote, int *nr_pages,
int (*o_preprw)(int cmd, struct obd_export *exp, struct obdo *oa,
int objcount, struct obd_ioobj *obj,
struct niobuf_remote *remote, int *nr_pages,
struct obd_quotactl *);
int (*o_quota_adjust_qunit)(struct obd_export *exp,
struct quota_adjust_qunit *oqaq,
struct obd_quotactl *);
int (*o_quota_adjust_qunit)(struct obd_export *exp,
struct quota_adjust_qunit *oqaq,
/*
* NOTE: If adding ops, add another LPROCFS_OBD_OP_INIT() line
* to lprocfs_alloc_obd_stats() in obdclass/lprocfs_status.c.
/*
* NOTE: If adding ops, add another LPROCFS_OBD_OP_INIT() line
* to lprocfs_alloc_obd_stats() in obdclass/lprocfs_status.c.