aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-08-12 06:49:41 -0400
committerBen Myers <bpm@sgi.com>2013-08-12 17:44:11 -0400
commitff55068c2010f39bcd899ca14b0a3d401d14da54 (patch)
treee207720e153c782682f833d0c00441fda88fadb2 /fs/xfs/xfs_mount.h
parent1fb7e48db6810093012873a652062648ace6b5bb (diff)
xfs: introduce xfs_sb.c for sharing with libxfs
xfs_mount.c is shared with userspace, but the only functions that are shared are to do with physical superblock manipulations. This means that less than 25% of the xfs_mount.c code is actually shared with userspace. Move all the superblock functions to xfs_sb.c and share that instead with libxfs. Note that this will leave all the in-core transaction related superblock counter modifications in xfs_mount.c as none of that is shared with userspace. With a few more small changes, xfs_mount.h won't need to be shared with userspace anymore, either. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r--fs/xfs/xfs_mount.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 27d0d5c72f4f..5488df18c200 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -292,14 +292,6 @@ xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d)
292} 292}
293 293
294/* 294/*
295 * perag get/put wrappers for ref counting
296 */
297struct xfs_perag *xfs_perag_get(struct xfs_mount *mp, xfs_agnumber_t agno);
298struct xfs_perag *xfs_perag_get_tag(struct xfs_mount *mp, xfs_agnumber_t agno,
299 int tag);
300void xfs_perag_put(struct xfs_perag *pag);
301
302/*
303 * Per-cpu superblock locking functions 295 * Per-cpu superblock locking functions
304 */ 296 */
305#ifdef HAVE_PERCPU_SB 297#ifdef HAVE_PERCPU_SB
@@ -331,6 +323,8 @@ typedef struct xfs_mod_sb {
331extern int xfs_log_sbcount(xfs_mount_t *); 323extern int xfs_log_sbcount(xfs_mount_t *);
332extern __uint64_t xfs_default_resblks(xfs_mount_t *mp); 324extern __uint64_t xfs_default_resblks(xfs_mount_t *mp);
333extern int xfs_mountfs(xfs_mount_t *mp); 325extern int xfs_mountfs(xfs_mount_t *mp);
326extern int xfs_initialize_perag(xfs_mount_t *mp, xfs_agnumber_t agcount,
327 xfs_agnumber_t *maxagi);
334 328
335extern void xfs_unmountfs(xfs_mount_t *); 329extern void xfs_unmountfs(xfs_mount_t *);
336extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int); 330extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int);
@@ -349,13 +343,4 @@ extern void xfs_set_low_space_thresholds(struct xfs_mount *);
349 343
350#endif /* __KERNEL__ */ 344#endif /* __KERNEL__ */
351 345
352extern void xfs_sb_calc_crc(struct xfs_buf *);
353extern void xfs_mod_sb(struct xfs_trans *, __int64_t);
354extern int xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t,
355 xfs_agnumber_t *);
356extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);
357extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t);
358
359extern const struct xfs_buf_ops xfs_sb_buf_ops;
360
361#endif /* __XFS_MOUNT_H__ */ 346#endif /* __XFS_MOUNT_H__ */