aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r--fs/xfs/xfs_mount.h101
1 files changed, 0 insertions, 101 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index c618f7cb5f0e..f7b761f09ab4 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -196,105 +196,6 @@ typedef struct xfs_qmops {
196#define XFS_QM_QUOTACTL(mp, cmd, id, addr) \ 196#define XFS_QM_QUOTACTL(mp, cmd, id, addr) \
197 (*(mp)->m_qm_ops->xfs_quotactl)(mp, cmd, id, addr) 197 (*(mp)->m_qm_ops->xfs_quotactl)(mp, cmd, id, addr)
198 198
199
200/*
201 * Prototypes and functions for I/O core modularization.
202 */
203
204typedef int (*xfs_ioinit_t)(struct xfs_mount *,
205 struct xfs_mount_args *, int);
206typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *,
207 xfs_fileoff_t, xfs_filblks_t, int,
208 xfs_fsblock_t *, xfs_extlen_t,
209 struct xfs_bmbt_irec *, int *,
210 struct xfs_bmap_free *, struct xfs_extdelta *);
211typedef int (*xfs_bunmapi_t)(struct xfs_trans *,
212 void *, xfs_fileoff_t,
213 xfs_filblks_t, int, xfs_extnum_t,
214 xfs_fsblock_t *, struct xfs_bmap_free *,
215 struct xfs_extdelta *, int *);
216typedef int (*xfs_bmap_eof_t)(void *, xfs_fileoff_t, int, int *);
217typedef int (*xfs_iomap_write_direct_t)(
218 void *, xfs_off_t, size_t, int,
219 struct xfs_bmbt_irec *, int *, int);
220typedef int (*xfs_iomap_write_delay_t)(
221 void *, xfs_off_t, size_t, int,
222 struct xfs_bmbt_irec *, int *);
223typedef int (*xfs_iomap_write_allocate_t)(
224 void *, xfs_off_t, size_t,
225 struct xfs_bmbt_irec *, int *);
226typedef int (*xfs_iomap_write_unwritten_t)(
227 void *, xfs_off_t, size_t);
228typedef uint (*xfs_lck_map_shared_t)(void *);
229typedef void (*xfs_lock_t)(void *, uint);
230typedef void (*xfs_lock_demote_t)(void *, uint);
231typedef int (*xfs_lock_nowait_t)(void *, uint);
232typedef void (*xfs_unlk_t)(void *, unsigned int);
233typedef xfs_fsize_t (*xfs_size_t)(void *);
234typedef xfs_fsize_t (*xfs_iodone_t)(struct xfs_mount *);
235typedef int (*xfs_swap_extents_t)(void *, void *,
236 struct xfs_swapext*);
237
238typedef struct xfs_ioops {
239 xfs_ioinit_t xfs_ioinit;
240 xfs_bmapi_t xfs_bmapi_func;
241 xfs_bunmapi_t xfs_bunmapi_func;
242 xfs_bmap_eof_t xfs_bmap_eof_func;
243 xfs_iomap_write_direct_t xfs_iomap_write_direct;
244 xfs_iomap_write_delay_t xfs_iomap_write_delay;
245 xfs_iomap_write_allocate_t xfs_iomap_write_allocate;
246 xfs_iomap_write_unwritten_t xfs_iomap_write_unwritten;
247 xfs_lock_t xfs_ilock;
248 xfs_lck_map_shared_t xfs_lck_map_shared;
249 xfs_lock_demote_t xfs_ilock_demote;
250 xfs_lock_nowait_t xfs_ilock_nowait;
251 xfs_unlk_t xfs_unlock;
252 xfs_size_t xfs_size_func;
253 xfs_iodone_t xfs_iodone;
254 xfs_swap_extents_t xfs_swap_extents_func;
255} xfs_ioops_t;
256
257#define XFS_IOINIT(mp, args, flags) \
258 (*(mp)->m_io_ops.xfs_ioinit)(mp, args, flags)
259#define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist,delta) \
260 (*(mp)->m_io_ops.xfs_bmapi_func) \
261 (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist,delta)
262#define XFS_BUNMAPI(mp, trans,io,bno,len,f,nexts,first,flist,delta,done) \
263 (*(mp)->m_io_ops.xfs_bunmapi_func) \
264 (trans,(io)->io_obj,bno,len,f,nexts,first,flist,delta,done)
265#define XFS_BMAP_EOF(mp, io, endoff, whichfork, eof) \
266 (*(mp)->m_io_ops.xfs_bmap_eof_func) \
267 ((io)->io_obj, endoff, whichfork, eof)
268#define XFS_IOMAP_WRITE_DIRECT(mp, io, offset, count, flags, mval, nmap, found)\
269 (*(mp)->m_io_ops.xfs_iomap_write_direct) \
270 ((io)->io_obj, offset, count, flags, mval, nmap, found)
271#define XFS_IOMAP_WRITE_DELAY(mp, io, offset, count, flags, mval, nmap) \
272 (*(mp)->m_io_ops.xfs_iomap_write_delay) \
273 ((io)->io_obj, offset, count, flags, mval, nmap)
274#define XFS_IOMAP_WRITE_ALLOCATE(mp, io, offset, count, mval, nmap) \
275 (*(mp)->m_io_ops.xfs_iomap_write_allocate) \
276 ((io)->io_obj, offset, count, mval, nmap)
277#define XFS_IOMAP_WRITE_UNWRITTEN(mp, io, offset, count) \
278 (*(mp)->m_io_ops.xfs_iomap_write_unwritten) \
279 ((io)->io_obj, offset, count)
280#define XFS_LCK_MAP_SHARED(mp, io) \
281 (*(mp)->m_io_ops.xfs_lck_map_shared)((io)->io_obj)
282#define XFS_ILOCK(mp, io, mode) \
283 (*(mp)->m_io_ops.xfs_ilock)((io)->io_obj, mode)
284#define XFS_ILOCK_NOWAIT(mp, io, mode) \
285 (*(mp)->m_io_ops.xfs_ilock_nowait)((io)->io_obj, mode)
286#define XFS_IUNLOCK(mp, io, mode) \
287 (*(mp)->m_io_ops.xfs_unlock)((io)->io_obj, mode)
288#define XFS_ILOCK_DEMOTE(mp, io, mode) \
289 (*(mp)->m_io_ops.xfs_ilock_demote)((io)->io_obj, mode)
290#define XFS_SIZE(mp, io) \
291 (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj)
292#define XFS_IODONE(mp) \
293 (*(mp)->m_io_ops.xfs_iodone)(mp)
294#define XFS_SWAP_EXTENTS(mp, io, tio, sxp) \
295 (*(mp)->m_io_ops.xfs_swap_extents_func) \
296 ((io)->io_obj, (tio)->io_obj, sxp)
297
298#ifdef HAVE_PERCPU_SB 199#ifdef HAVE_PERCPU_SB
299 200
300/* 201/*
@@ -423,7 +324,6 @@ typedef struct xfs_mount {
423 * hash table */ 324 * hash table */
424 struct xfs_dmops *m_dm_ops; /* vector of DMI ops */ 325 struct xfs_dmops *m_dm_ops; /* vector of DMI ops */
425 struct xfs_qmops *m_qm_ops; /* vector of XQM ops */ 326 struct xfs_qmops *m_qm_ops; /* vector of XQM ops */
426 struct xfs_ioops m_io_ops; /* vector of I/O ops */
427 atomic_t m_active_trans; /* number trans frozen */ 327 atomic_t m_active_trans; /* number trans frozen */
428#ifdef HAVE_PERCPU_SB 328#ifdef HAVE_PERCPU_SB
429 xfs_icsb_cnts_t *m_sb_cnts; /* per-cpu superblock counters */ 329 xfs_icsb_cnts_t *m_sb_cnts; /* per-cpu superblock counters */
@@ -646,7 +546,6 @@ extern int xfs_qmops_get(struct xfs_mount *, struct xfs_mount_args *);
646extern void xfs_qmops_put(struct xfs_mount *); 546extern void xfs_qmops_put(struct xfs_mount *);
647 547
648extern struct xfs_dmops xfs_dmcore_xfs; 548extern struct xfs_dmops xfs_dmcore_xfs;
649extern struct xfs_ioops xfs_iocore_xfs;
650 549
651extern int xfs_init(void); 550extern int xfs_init(void);
652extern void xfs_cleanup(void); 551extern void xfs_cleanup(void);