diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-08-12 06:49:41 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-12 17:44:11 -0400 |
commit | ff55068c2010f39bcd899ca14b0a3d401d14da54 (patch) | |
tree | e207720e153c782682f833d0c00441fda88fadb2 /fs/xfs/xfs_mount.h | |
parent | 1fb7e48db6810093012873a652062648ace6b5bb (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.h | 19 |
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 | */ | ||
297 | struct xfs_perag *xfs_perag_get(struct xfs_mount *mp, xfs_agnumber_t agno); | ||
298 | struct xfs_perag *xfs_perag_get_tag(struct xfs_mount *mp, xfs_agnumber_t agno, | ||
299 | int tag); | ||
300 | void 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 { | |||
331 | extern int xfs_log_sbcount(xfs_mount_t *); | 323 | extern int xfs_log_sbcount(xfs_mount_t *); |
332 | extern __uint64_t xfs_default_resblks(xfs_mount_t *mp); | 324 | extern __uint64_t xfs_default_resblks(xfs_mount_t *mp); |
333 | extern int xfs_mountfs(xfs_mount_t *mp); | 325 | extern int xfs_mountfs(xfs_mount_t *mp); |
326 | extern int xfs_initialize_perag(xfs_mount_t *mp, xfs_agnumber_t agcount, | ||
327 | xfs_agnumber_t *maxagi); | ||
334 | 328 | ||
335 | extern void xfs_unmountfs(xfs_mount_t *); | 329 | extern void xfs_unmountfs(xfs_mount_t *); |
336 | extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int); | 330 | extern 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 | ||
352 | extern void xfs_sb_calc_crc(struct xfs_buf *); | ||
353 | extern void xfs_mod_sb(struct xfs_trans *, __int64_t); | ||
354 | extern int xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t, | ||
355 | xfs_agnumber_t *); | ||
356 | extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); | ||
357 | extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); | ||
358 | |||
359 | extern const struct xfs_buf_ops xfs_sb_buf_ops; | ||
360 | |||
361 | #endif /* __XFS_MOUNT_H__ */ | 346 | #endif /* __XFS_MOUNT_H__ */ |