aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/glock.c5
-rw-r--r--fs/gfs2/glock.h2
-rw-r--r--fs/gfs2/lm_interface.h9
-rw-r--r--fs/gfs2/locking.c6
-rw-r--r--fs/gfs2/locking/dlm/lock_dlm.h2
-rw-r--r--fs/gfs2/locking/dlm/mount.c8
-rw-r--r--fs/gfs2/locking/dlm/sysfs.c2
-rw-r--r--fs/gfs2/locking/dlm/thread.c6
-rw-r--r--fs/gfs2/locking/nolock/main.c2
9 files changed, 20 insertions, 22 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 5759f52a1cf9..87b37fe269b6 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1704,7 +1704,7 @@ static void blocking_cb(struct gfs2_sbd *sdp, struct lm_lockname *name,
1704 1704
1705/** 1705/**
1706 * gfs2_glock_cb - Callback used by locking module 1706 * gfs2_glock_cb - Callback used by locking module
1707 * @fsdata: Pointer to the superblock 1707 * @sdp: Pointer to the superblock
1708 * @type: Type of callback 1708 * @type: Type of callback
1709 * @data: Type dependent data pointer 1709 * @data: Type dependent data pointer
1710 * 1710 *
@@ -1713,9 +1713,8 @@ static void blocking_cb(struct gfs2_sbd *sdp, struct lm_lockname *name,
1713 * a journal from another client needs to be recovered. 1713 * a journal from another client needs to be recovered.
1714 */ 1714 */
1715 1715
1716void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data) 1716void gfs2_glock_cb(struct gfs2_sbd *sdp, unsigned int type, void *data)
1717{ 1717{
1718 struct gfs2_sbd *sdp = (struct gfs2_sbd *)fsdata;
1719 1718
1720 switch (type) { 1719 switch (type) {
1721 case LM_CB_NEED_E: 1720 case LM_CB_NEED_E:
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h
index 0febca3d6d47..e3bf4bcd4b29 100644
--- a/fs/gfs2/glock.h
+++ b/fs/gfs2/glock.h
@@ -140,7 +140,7 @@ static inline int gfs2_glock_nq_init(struct gfs2_glock *gl,
140int gfs2_lvb_hold(struct gfs2_glock *gl); 140int gfs2_lvb_hold(struct gfs2_glock *gl);
141void gfs2_lvb_unhold(struct gfs2_glock *gl); 141void gfs2_lvb_unhold(struct gfs2_glock *gl);
142 142
143void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data); 143void gfs2_glock_cb(struct gfs2_sbd *sdp, unsigned int type, void *data);
144 144
145void gfs2_iopen_go_callback(struct gfs2_glock *gl, unsigned int state); 145void gfs2_iopen_go_callback(struct gfs2_glock *gl, unsigned int state);
146 146
diff --git a/fs/gfs2/lm_interface.h b/fs/gfs2/lm_interface.h
index e2dfc3da4da9..75835e0f4254 100644
--- a/fs/gfs2/lm_interface.h
+++ b/fs/gfs2/lm_interface.h
@@ -17,10 +17,9 @@
17 17
18typedef void lm_lockspace_t; 18typedef void lm_lockspace_t;
19typedef void lm_lock_t; 19typedef void lm_lock_t;
20typedef void lm_fsdata_t; 20struct gfs2_sbd;
21 21
22typedef void (*lm_callback_t) (lm_fsdata_t *fsdata, unsigned int type, 22typedef void (*lm_callback_t) (struct gfs2_sbd *sdp, unsigned int type, void *data);
23 void *data);
24 23
25/* 24/*
26 * lm_mount() flags 25 * lm_mount() flags
@@ -183,7 +182,7 @@ struct lm_lockops {
183 */ 182 */
184 183
185 int (*lm_mount) (char *table_name, char *host_data, 184 int (*lm_mount) (char *table_name, char *host_data,
186 lm_callback_t cb, lm_fsdata_t *fsdata, 185 lm_callback_t cb, struct gfs2_sbd *sdp,
187 unsigned int min_lvb_size, int flags, 186 unsigned int min_lvb_size, int flags,
188 struct lm_lockstruct *lockstruct, 187 struct lm_lockstruct *lockstruct,
189 struct kobject *fskobj); 188 struct kobject *fskobj);
@@ -275,7 +274,7 @@ void gfs2_unregister_lockproto(struct lm_lockops *proto);
275 */ 274 */
276 275
277int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data, 276int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data,
278 lm_callback_t cb, lm_fsdata_t *fsdata, 277 lm_callback_t cb, struct gfs2_sbd *sdp,
279 unsigned int min_lvb_size, int flags, 278 unsigned int min_lvb_size, int flags,
280 struct lm_lockstruct *lockstruct, 279 struct lm_lockstruct *lockstruct,
281 struct kobject *fskobj); 280 struct kobject *fskobj);
diff --git a/fs/gfs2/locking.c b/fs/gfs2/locking.c
index fce2001e5e25..31421ee6d863 100644
--- a/fs/gfs2/locking.c
+++ b/fs/gfs2/locking.c
@@ -99,7 +99,7 @@ void gfs2_unregister_lockproto(struct lm_lockops *proto)
99 * @table_name - the name of the lock space 99 * @table_name - the name of the lock space
100 * @host_data - data specific to this host 100 * @host_data - data specific to this host
101 * @cb - the callback to the code using the lock module 101 * @cb - the callback to the code using the lock module
102 * @fsdata - data to pass back with the callback 102 * @sdp - The GFS2 superblock
103 * @min_lvb_size - the mininum LVB size that the caller can deal with 103 * @min_lvb_size - the mininum LVB size that the caller can deal with
104 * @flags - LM_MFLAG_* 104 * @flags - LM_MFLAG_*
105 * @lockstruct - a structure returned describing the mount 105 * @lockstruct - a structure returned describing the mount
@@ -108,7 +108,7 @@ void gfs2_unregister_lockproto(struct lm_lockops *proto)
108 */ 108 */
109 109
110int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data, 110int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data,
111 lm_callback_t cb, lm_fsdata_t *fsdata, 111 lm_callback_t cb, struct gfs2_sbd *sdp,
112 unsigned int min_lvb_size, int flags, 112 unsigned int min_lvb_size, int flags,
113 struct lm_lockstruct *lockstruct, 113 struct lm_lockstruct *lockstruct,
114 struct kobject *fskobj) 114 struct kobject *fskobj)
@@ -147,7 +147,7 @@ retry:
147 goto retry; 147 goto retry;
148 } 148 }
149 149
150 error = lw->lw_ops->lm_mount(table_name, host_data, cb, fsdata, 150 error = lw->lw_ops->lm_mount(table_name, host_data, cb, sdp,
151 min_lvb_size, flags, lockstruct, fskobj); 151 min_lvb_size, flags, lockstruct, fskobj);
152 if (error) 152 if (error)
153 module_put(lw->lw_ops->lm_owner); 153 module_put(lw->lw_ops->lm_owner);
diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h
index c7b6e370258f..e6898d236521 100644
--- a/fs/gfs2/locking/dlm/lock_dlm.h
+++ b/fs/gfs2/locking/dlm/lock_dlm.h
@@ -67,7 +67,7 @@ struct gdlm_ls {
67 int fsflags; 67 int fsflags;
68 dlm_lockspace_t *dlm_lockspace; 68 dlm_lockspace_t *dlm_lockspace;
69 lm_callback_t fscb; 69 lm_callback_t fscb;
70 lm_fsdata_t *fsdata; 70 struct gfs2_sbd *sdp;
71 int recover_jid; 71 int recover_jid;
72 int recover_jid_done; 72 int recover_jid_done;
73 int recover_jid_status; 73 int recover_jid_status;
diff --git a/fs/gfs2/locking/dlm/mount.c b/fs/gfs2/locking/dlm/mount.c
index 82ac00af84a3..8a1764f4d71c 100644
--- a/fs/gfs2/locking/dlm/mount.c
+++ b/fs/gfs2/locking/dlm/mount.c
@@ -14,7 +14,7 @@ int gdlm_drop_period;
14struct lm_lockops gdlm_ops; 14struct lm_lockops gdlm_ops;
15 15
16 16
17static struct gdlm_ls *init_gdlm(lm_callback_t cb, lm_fsdata_t *fsdata, 17static struct gdlm_ls *init_gdlm(lm_callback_t cb, struct gfs2_sbd *sdp,
18 int flags, char *table_name) 18 int flags, char *table_name)
19{ 19{
20 struct gdlm_ls *ls; 20 struct gdlm_ls *ls;
@@ -27,7 +27,7 @@ static struct gdlm_ls *init_gdlm(lm_callback_t cb, lm_fsdata_t *fsdata,
27 ls->drop_locks_count = gdlm_drop_count; 27 ls->drop_locks_count = gdlm_drop_count;
28 ls->drop_locks_period = gdlm_drop_period; 28 ls->drop_locks_period = gdlm_drop_period;
29 ls->fscb = cb; 29 ls->fscb = cb;
30 ls->fsdata = fsdata; 30 ls->sdp = sdp;
31 ls->fsflags = flags; 31 ls->fsflags = flags;
32 spin_lock_init(&ls->async_lock); 32 spin_lock_init(&ls->async_lock);
33 INIT_LIST_HEAD(&ls->complete); 33 INIT_LIST_HEAD(&ls->complete);
@@ -120,7 +120,7 @@ static int make_args(struct gdlm_ls *ls, char *data_arg, int *nodir)
120} 120}
121 121
122static int gdlm_mount(char *table_name, char *host_data, 122static int gdlm_mount(char *table_name, char *host_data,
123 lm_callback_t cb, lm_fsdata_t *fsdata, 123 lm_callback_t cb, struct gfs2_sbd *sdp,
124 unsigned int min_lvb_size, int flags, 124 unsigned int min_lvb_size, int flags,
125 struct lm_lockstruct *lockstruct, 125 struct lm_lockstruct *lockstruct,
126 struct kobject *fskobj) 126 struct kobject *fskobj)
@@ -131,7 +131,7 @@ static int gdlm_mount(char *table_name, char *host_data,
131 if (min_lvb_size > GDLM_LVB_SIZE) 131 if (min_lvb_size > GDLM_LVB_SIZE)
132 goto out; 132 goto out;
133 133
134 ls = init_gdlm(cb, fsdata, flags, table_name); 134 ls = init_gdlm(cb, sdp, flags, table_name);
135 if (!ls) 135 if (!ls)
136 goto out; 136 goto out;
137 137
diff --git a/fs/gfs2/locking/dlm/sysfs.c b/fs/gfs2/locking/dlm/sysfs.c
index c1237a91fc68..29ae06f94944 100644
--- a/fs/gfs2/locking/dlm/sysfs.c
+++ b/fs/gfs2/locking/dlm/sysfs.c
@@ -102,7 +102,7 @@ static ssize_t recover_show(struct gdlm_ls *ls, char *buf)
102static ssize_t recover_store(struct gdlm_ls *ls, const char *buf, size_t len) 102static ssize_t recover_store(struct gdlm_ls *ls, const char *buf, size_t len)
103{ 103{
104 ls->recover_jid = simple_strtol(buf, NULL, 0); 104 ls->recover_jid = simple_strtol(buf, NULL, 0);
105 ls->fscb(ls->fsdata, LM_CB_NEED_RECOVERY, &ls->recover_jid); 105 ls->fscb(ls->sdp, LM_CB_NEED_RECOVERY, &ls->recover_jid);
106 return len; 106 return len;
107} 107}
108 108
diff --git a/fs/gfs2/locking/dlm/thread.c b/fs/gfs2/locking/dlm/thread.c
index d4895ec242f6..554bf882a4c2 100644
--- a/fs/gfs2/locking/dlm/thread.c
+++ b/fs/gfs2/locking/dlm/thread.c
@@ -41,7 +41,7 @@ static void process_blocking(struct gdlm_lock *lp, int bast_mode)
41 gdlm_assert(0, "unknown bast mode %u", lp->bast_mode); 41 gdlm_assert(0, "unknown bast mode %u", lp->bast_mode);
42 } 42 }
43 43
44 ls->fscb(ls->fsdata, cb, &lp->lockname); 44 ls->fscb(ls->sdp, cb, &lp->lockname);
45} 45}
46 46
47static void process_complete(struct gdlm_lock *lp) 47static void process_complete(struct gdlm_lock *lp)
@@ -232,7 +232,7 @@ out:
232 (lp->cur > DLM_LOCK_NL) && (prev_mode > DLM_LOCK_NL)) 232 (lp->cur > DLM_LOCK_NL) && (prev_mode > DLM_LOCK_NL))
233 acb.lc_ret |= LM_OUT_CACHEABLE; 233 acb.lc_ret |= LM_OUT_CACHEABLE;
234 234
235 ls->fscb(ls->fsdata, LM_CB_ASYNC, &acb); 235 ls->fscb(ls->sdp, LM_CB_ASYNC, &acb);
236} 236}
237 237
238static inline int no_work(struct gdlm_ls *ls, int blocking) 238static inline int no_work(struct gdlm_ls *ls, int blocking)
@@ -318,7 +318,7 @@ static int gdlm_thread(void *data)
318 gdlm_do_lock(lp); 318 gdlm_do_lock(lp);
319 319
320 if (drop) 320 if (drop)
321 ls->fscb(ls->fsdata, LM_CB_DROPLOCKS, NULL); 321 ls->fscb(ls->sdp, LM_CB_DROPLOCKS, NULL);
322 322
323 schedule(); 323 schedule();
324 } 324 }
diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c
index 95a29914730a..e326079430a2 100644
--- a/fs/gfs2/locking/nolock/main.c
+++ b/fs/gfs2/locking/nolock/main.c
@@ -24,7 +24,7 @@ struct nolock_lockspace {
24static struct lm_lockops nolock_ops; 24static struct lm_lockops nolock_ops;
25 25
26static int nolock_mount(char *table_name, char *host_data, 26static int nolock_mount(char *table_name, char *host_data,
27 lm_callback_t cb, lm_fsdata_t *fsdata, 27 lm_callback_t cb, struct gfs2_sbd *sdp,
28 unsigned int min_lvb_size, int flags, 28 unsigned int min_lvb_size, int flags,
29 struct lm_lockstruct *lockstruct, 29 struct lm_lockstruct *lockstruct,
30 struct kobject *fskobj) 30 struct kobject *fskobj)