struct llog_handle *phd_cat_handle;
struct llog_cookie phd_cookie; /* cookie of this log in its cat */
int phd_last_idx;
};
struct cat_handle_data {
struct llog_handle *phd_cat_handle;
struct llog_cookie phd_cookie; /* cookie of this log in its cat */
int phd_last_idx;
};
struct cat_handle_data {
struct llog_handle *chd_current_log; /* currently open log */
};
/* In-memory descriptor for a log object or log catalog */
struct llog_handle {
struct llog_handle *chd_current_log; /* currently open log */
};
/* In-memory descriptor for a log object or log catalog */
struct llog_handle {
extern void llog_free_handle(struct llog_handle *handle);
int llog_process(struct llog_handle *loghandle, llog_cb_t cb,
void *data, void *catdata);
extern void llog_free_handle(struct llog_handle *handle);
int llog_process(struct llog_handle *loghandle, llog_cb_t cb,
void *data, void *catdata);
int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb,
void *data, void *catdata);
extern int llog_cancel_rec(struct llog_handle *loghandle, int index);
extern int llog_close(struct llog_handle *cathandle);
extern int llog_get_size(struct llog_handle *loghandle);
int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb,
void *data, void *catdata);
extern int llog_cancel_rec(struct llog_handle *loghandle, int index);
extern int llog_close(struct llog_handle *cathandle);
extern int llog_get_size(struct llog_handle *loghandle);
struct llog_cookie *cookies);
int llog_cat_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data,
int startcat, int startidx);
struct llog_cookie *cookies);
int llog_cat_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data,
int startcat, int startidx);
+int llog_cat_process_flags(struct llog_handle *cat_llh, llog_cb_t cb, void *data,
+ int flags, int startcat, int startidx);
int llog_cat_process_thread(void *data);
int llog_cat_reverse_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data);
int llog_cat_set_first_idx(struct llog_handle *cathandle, int index);
int llog_cat_process_thread(void *data);
int llog_cat_reverse_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data);
int llog_cat_set_first_idx(struct llog_handle *cathandle, int index);
struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
struct llog_cookie *logcookies, int numcookies);
struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
struct llog_cookie *logcookies, int numcookies);
- struct obd_device *disk_obd, int count,
- struct llog_catid *logid, struct obd_uuid *uuid);
+ struct obd_device *disk_obd, int *idx);
char *name, int idx, int count,
struct llog_catid *idarray);
char *name, int idx, int count,
struct llog_catid *idarray);
char *name, int idx, int count, struct llog_catid *idarray);
char *name, int idx, int count, struct llog_catid *idarray);
struct llog_handle *loc_handle;
struct llog_commit_master *loc_lcm;
struct llog_canceld_ctxt *loc_llcd;
struct llog_handle *loc_handle;
struct llog_commit_master *loc_lcm;
struct llog_canceld_ctxt *loc_llcd;
/**
* Current llcd size while gathering cookies. This should not be
* more than ->llcd_size. Used for determining if we need to
/**
* Current llcd size while gathering cookies. This should not be
* more than ->llcd_size. Used for determining if we need to
- if (!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME))
- ctxt->loc_gen.mnt_cnt = obd->u.mds.mds_mount_count;
- else if (!strstr(obd->obd_type->typ_name, LUSTRE_OST_NAME))
- ctxt->loc_gen.mnt_cnt = obd->u.filter.fo_mount_count;
- else
- ctxt->loc_gen.mnt_cnt = 0;
+ LASSERTF(obd->u.obt.obt_magic == OBT_MAGIC,
+ "%s: wrong obt magic %#x\n",
+ obd->obd_name, obd->u.obt.obt_magic);
+ ctxt->loc_gen.mnt_cnt = obd->u.obt.obt_mount_count;
+ ctxt->loc_gen.conn_cnt++;
CDEBUG(D_INFO, "GETting ctxt %p : new refcount %d\n", ctxt,
CDEBUG(D_INFO, "GETting ctxt %p : new refcount %d\n", ctxt,
- LASSERT(atomic_read(&ctxt->loc_refcount) > 0);
- LASSERT(atomic_read(&ctxt->loc_refcount) < 0x5a5a5a);
+ LASSERT(cfs_atomic_read(&ctxt->loc_refcount) > 0);
+ LASSERT(cfs_atomic_read(&ctxt->loc_refcount) < 0x5a5a5a);
CDEBUG(D_INFO, "PUTting ctxt %p : new refcount %d\n", ctxt,
CDEBUG(D_INFO, "PUTting ctxt %p : new refcount %d\n", ctxt,
__llog_ctxt_put(ctxt);
}
static inline void llog_group_init(struct obd_llog_group *olg, int group)
{
cfs_waitq_init(&olg->olg_waitq);
__llog_ctxt_put(ctxt);
}
static inline void llog_group_init(struct obd_llog_group *olg, int group)
{
cfs_waitq_init(&olg->olg_waitq);
- spin_lock_init(&olg->olg_lock);
- sema_init(&olg->olg_cat_processing, 1);
- olg->olg_group = group;
+ cfs_spin_lock_init(&olg->olg_lock);
+ cfs_sema_init(&olg->olg_cat_processing, 1);
+ olg->olg_seq = group;
if (olg->olg_exp != NULL && olg->olg_exp != exp)
CWARN("%s: export for group %d is changed: 0x%p -> 0x%p\n",
if (olg->olg_exp != NULL && olg->olg_exp != exp)
CWARN("%s: export for group %d is changed: 0x%p -> 0x%p\n",
+int lustre_process_log(struct super_block *sb, char *logname,
+ struct config_llog_instance *cfg);
+int lustre_end_log(struct super_block *sb, char *logname,
+ struct config_llog_instance *cfg);
+
+/** @} log */
+