/**
* gfs2_glock_cb - Callback used by locking module
- * @fsdata: Pointer to the superblock
+ * @sdp: Pointer to the superblock
* @type: Type of callback
* @data: Type dependent data pointer
*
* a journal from another client needs to be recovered.
*/
-void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data)
+void gfs2_glock_cb(struct gfs2_sbd *sdp, unsigned int type, void *data)
{
- struct gfs2_sbd *sdp = (struct gfs2_sbd *)fsdata;
switch (type) {
case LM_CB_NEED_E:
int gfs2_lvb_hold(struct gfs2_glock *gl);
void gfs2_lvb_unhold(struct gfs2_glock *gl);
-void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data);
+void gfs2_glock_cb(struct gfs2_sbd *sdp, unsigned int type, void *data);
void gfs2_iopen_go_callback(struct gfs2_glock *gl, unsigned int state);
typedef void lm_lockspace_t;
typedef void lm_lock_t;
-typedef void lm_fsdata_t;
+struct gfs2_sbd;
-typedef void (*lm_callback_t) (lm_fsdata_t *fsdata, unsigned int type,
- void *data);
+typedef void (*lm_callback_t) (struct gfs2_sbd *sdp, unsigned int type, void *data);
/*
* lm_mount() flags
*/
int (*lm_mount) (char *table_name, char *host_data,
- lm_callback_t cb, lm_fsdata_t *fsdata,
+ lm_callback_t cb, struct gfs2_sbd *sdp,
unsigned int min_lvb_size, int flags,
struct lm_lockstruct *lockstruct,
struct kobject *fskobj);
*/
int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data,
- lm_callback_t cb, lm_fsdata_t *fsdata,
+ lm_callback_t cb, struct gfs2_sbd *sdp,
unsigned int min_lvb_size, int flags,
struct lm_lockstruct *lockstruct,
struct kobject *fskobj);
* @table_name - the name of the lock space
* @host_data - data specific to this host
* @cb - the callback to the code using the lock module
- * @fsdata - data to pass back with the callback
+ * @sdp - The GFS2 superblock
* @min_lvb_size - the mininum LVB size that the caller can deal with
* @flags - LM_MFLAG_*
* @lockstruct - a structure returned describing the mount
*/
int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data,
- lm_callback_t cb, lm_fsdata_t *fsdata,
+ lm_callback_t cb, struct gfs2_sbd *sdp,
unsigned int min_lvb_size, int flags,
struct lm_lockstruct *lockstruct,
struct kobject *fskobj)
goto retry;
}
- error = lw->lw_ops->lm_mount(table_name, host_data, cb, fsdata,
+ error = lw->lw_ops->lm_mount(table_name, host_data, cb, sdp,
min_lvb_size, flags, lockstruct, fskobj);
if (error)
module_put(lw->lw_ops->lm_owner);
int fsflags;
dlm_lockspace_t *dlm_lockspace;
lm_callback_t fscb;
- lm_fsdata_t *fsdata;
+ struct gfs2_sbd *sdp;
int recover_jid;
int recover_jid_done;
int recover_jid_status;
struct lm_lockops gdlm_ops;
-static struct gdlm_ls *init_gdlm(lm_callback_t cb, lm_fsdata_t *fsdata,
+static struct gdlm_ls *init_gdlm(lm_callback_t cb, struct gfs2_sbd *sdp,
int flags, char *table_name)
{
struct gdlm_ls *ls;
ls->drop_locks_count = gdlm_drop_count;
ls->drop_locks_period = gdlm_drop_period;
ls->fscb = cb;
- ls->fsdata = fsdata;
+ ls->sdp = sdp;
ls->fsflags = flags;
spin_lock_init(&ls->async_lock);
INIT_LIST_HEAD(&ls->complete);
}
static int gdlm_mount(char *table_name, char *host_data,
- lm_callback_t cb, lm_fsdata_t *fsdata,
+ lm_callback_t cb, struct gfs2_sbd *sdp,
unsigned int min_lvb_size, int flags,
struct lm_lockstruct *lockstruct,
struct kobject *fskobj)
if (min_lvb_size > GDLM_LVB_SIZE)
goto out;
- ls = init_gdlm(cb, fsdata, flags, table_name);
+ ls = init_gdlm(cb, sdp, flags, table_name);
if (!ls)
goto out;
static ssize_t recover_store(struct gdlm_ls *ls, const char *buf, size_t len)
{
ls->recover_jid = simple_strtol(buf, NULL, 0);
- ls->fscb(ls->fsdata, LM_CB_NEED_RECOVERY, &ls->recover_jid);
+ ls->fscb(ls->sdp, LM_CB_NEED_RECOVERY, &ls->recover_jid);
return len;
}
gdlm_assert(0, "unknown bast mode %u", lp->bast_mode);
}
- ls->fscb(ls->fsdata, cb, &lp->lockname);
+ ls->fscb(ls->sdp, cb, &lp->lockname);
}
static void process_complete(struct gdlm_lock *lp)
(lp->cur > DLM_LOCK_NL) && (prev_mode > DLM_LOCK_NL))
acb.lc_ret |= LM_OUT_CACHEABLE;
- ls->fscb(ls->fsdata, LM_CB_ASYNC, &acb);
+ ls->fscb(ls->sdp, LM_CB_ASYNC, &acb);
}
static inline int no_work(struct gdlm_ls *ls, int blocking)
gdlm_do_lock(lp);
if (drop)
- ls->fscb(ls->fsdata, LM_CB_DROPLOCKS, NULL);
+ ls->fscb(ls->sdp, LM_CB_DROPLOCKS, NULL);
schedule();
}
static struct lm_lockops nolock_ops;
static int nolock_mount(char *table_name, char *host_data,
- lm_callback_t cb, lm_fsdata_t *fsdata,
+ lm_callback_t cb, struct gfs2_sbd *sdp,
unsigned int min_lvb_size, int flags,
struct lm_lockstruct *lockstruct,
struct kobject *fskobj)