aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-08-12 06:49:32 -0400
committerBen Myers <bpm@sgi.com>2013-08-12 17:36:16 -0400
commit7fd36c4418ee86712db6871ac95ab23743224bff (patch)
tree8f449f4eba8c31a16362e8640089489aa7579eff /fs/xfs/xfs_mount.h
parentd386b32b553ce145fb40f0d9360b6e5a79b5a80c (diff)
xfs: split out transaction reservation code
The transaction reservation size calculations is used by both kernel and userspace, but most of the transaction code in xfs_trans.c is kernel specific. Split all the transaction reservation code out into it's own files to make sharing with userspace simpler. This just leaves kernel-only definitions in xfs_trans.h, so it doesn't need to be shared with userspace anymore, either. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@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.h42
1 files changed, 2 insertions, 40 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 4e374d4a9189..27d0d5c72f4f 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -18,45 +18,7 @@
18#ifndef __XFS_MOUNT_H__ 18#ifndef __XFS_MOUNT_H__
19#define __XFS_MOUNT_H__ 19#define __XFS_MOUNT_H__
20 20
21typedef struct xfs_trans_reservations { 21#ifdef __KERNEL__
22 uint tr_write; /* extent alloc trans */
23 uint tr_itruncate; /* truncate trans */
24 uint tr_rename; /* rename trans */
25 uint tr_link; /* link trans */
26 uint tr_remove; /* unlink trans */
27 uint tr_symlink; /* symlink trans */
28 uint tr_create; /* create trans */
29 uint tr_mkdir; /* mkdir trans */
30 uint tr_ifree; /* inode free trans */
31 uint tr_ichange; /* inode update trans */
32 uint tr_growdata; /* fs data section grow trans */
33 uint tr_swrite; /* sync write inode trans */
34 uint tr_addafork; /* cvt inode to attributed trans */
35 uint tr_writeid; /* write setuid/setgid file */
36 uint tr_attrinval; /* attr fork buffer invalidation */
37 uint tr_attrsetm; /* set/create an attribute at mount time */
38 uint tr_attrsetrt; /* set/create an attribute at runtime */
39 uint tr_attrrm; /* remove an attribute */
40 uint tr_clearagi; /* clear bad agi unlinked ino bucket */
41 uint tr_growrtalloc; /* grow realtime allocations */
42 uint tr_growrtzero; /* grow realtime zeroing */
43 uint tr_growrtfree; /* grow realtime freeing */
44 uint tr_qm_sbchange; /* change quota flags */
45 uint tr_qm_setqlim; /* adjust quota limits */
46 uint tr_qm_dqalloc; /* allocate quota on disk */
47 uint tr_qm_quotaoff; /* turn quota off */
48 uint tr_qm_equotaoff;/* end of turn quota off */
49 uint tr_sb; /* modify superblock */
50} xfs_trans_reservations_t;
51
52#ifndef __KERNEL__
53
54#define xfs_daddr_to_agno(mp,d) \
55 ((xfs_agnumber_t)(XFS_BB_TO_FSBT(mp, d) / (mp)->m_sb.sb_agblocks))
56#define xfs_daddr_to_agbno(mp,d) \
57 ((xfs_agblock_t)(XFS_BB_TO_FSBT(mp, d) % (mp)->m_sb.sb_agblocks))
58
59#else /* __KERNEL__ */
60 22
61struct xlog; 23struct xlog;
62struct xfs_inode; 24struct xfs_inode;
@@ -174,7 +136,7 @@ typedef struct xfs_mount {
174 int m_ialloc_blks; /* blocks in inode allocation */ 136 int m_ialloc_blks; /* blocks in inode allocation */
175 int m_inoalign_mask;/* mask sb_inoalignmt if used */ 137 int m_inoalign_mask;/* mask sb_inoalignmt if used */
176 uint m_qflags; /* quota status flags */ 138 uint m_qflags; /* quota status flags */
177 xfs_trans_reservations_t m_reservations;/* precomputed res values */ 139 struct xfs_trans_resv m_reservations; /* precomputed res values */
178 __uint64_t m_maxicount; /* maximum inode count */ 140 __uint64_t m_maxicount; /* maximum inode count */
179 __uint64_t m_resblks; /* total reserved blocks */ 141 __uint64_t m_resblks; /* total reserved blocks */
180 __uint64_t m_resblks_avail;/* available reserved blocks */ 142 __uint64_t m_resblks_avail;/* available reserved blocks */