diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /fs/xfs/xfs_filestream.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/xfs/xfs_filestream.h')
-rw-r--r-- | fs/xfs/xfs_filestream.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/fs/xfs/xfs_filestream.h b/fs/xfs/xfs_filestream.h index f655f7dc334c..260f757bbc5d 100644 --- a/fs/xfs/xfs_filestream.h +++ b/fs/xfs/xfs_filestream.h | |||
@@ -79,28 +79,49 @@ extern ktrace_t *xfs_filestreams_trace_buf; | |||
79 | * the cache that reference per-ag array elements that have since been | 79 | * the cache that reference per-ag array elements that have since been |
80 | * reallocated. | 80 | * reallocated. |
81 | */ | 81 | */ |
82 | STATIC_INLINE int | 82 | /* |
83 | * xfs_filestream_peek_ag is only used in tracing code | ||
84 | */ | ||
85 | static inline int | ||
83 | xfs_filestream_peek_ag( | 86 | xfs_filestream_peek_ag( |
84 | xfs_mount_t *mp, | 87 | xfs_mount_t *mp, |
85 | xfs_agnumber_t agno) | 88 | xfs_agnumber_t agno) |
86 | { | 89 | { |
87 | return atomic_read(&mp->m_perag[agno].pagf_fstrms); | 90 | struct xfs_perag *pag; |
91 | int ret; | ||
92 | |||
93 | pag = xfs_perag_get(mp, agno); | ||
94 | ret = atomic_read(&pag->pagf_fstrms); | ||
95 | xfs_perag_put(pag); | ||
96 | return ret; | ||
88 | } | 97 | } |
89 | 98 | ||
90 | STATIC_INLINE int | 99 | static inline int |
91 | xfs_filestream_get_ag( | 100 | xfs_filestream_get_ag( |
92 | xfs_mount_t *mp, | 101 | xfs_mount_t *mp, |
93 | xfs_agnumber_t agno) | 102 | xfs_agnumber_t agno) |
94 | { | 103 | { |
95 | return atomic_inc_return(&mp->m_perag[agno].pagf_fstrms); | 104 | struct xfs_perag *pag; |
105 | int ret; | ||
106 | |||
107 | pag = xfs_perag_get(mp, agno); | ||
108 | ret = atomic_inc_return(&pag->pagf_fstrms); | ||
109 | xfs_perag_put(pag); | ||
110 | return ret; | ||
96 | } | 111 | } |
97 | 112 | ||
98 | STATIC_INLINE int | 113 | static inline int |
99 | xfs_filestream_put_ag( | 114 | xfs_filestream_put_ag( |
100 | xfs_mount_t *mp, | 115 | xfs_mount_t *mp, |
101 | xfs_agnumber_t agno) | 116 | xfs_agnumber_t agno) |
102 | { | 117 | { |
103 | return atomic_dec_return(&mp->m_perag[agno].pagf_fstrms); | 118 | struct xfs_perag *pag; |
119 | int ret; | ||
120 | |||
121 | pag = xfs_perag_get(mp, agno); | ||
122 | ret = atomic_dec_return(&pag->pagf_fstrms); | ||
123 | xfs_perag_put(pag); | ||
124 | return ret; | ||
104 | } | 125 | } |
105 | 126 | ||
106 | /* allocation selection flags */ | 127 | /* allocation selection flags */ |
@@ -114,7 +135,6 @@ int xfs_filestream_init(void); | |||
114 | void xfs_filestream_uninit(void); | 135 | void xfs_filestream_uninit(void); |
115 | int xfs_filestream_mount(struct xfs_mount *mp); | 136 | int xfs_filestream_mount(struct xfs_mount *mp); |
116 | void xfs_filestream_unmount(struct xfs_mount *mp); | 137 | void xfs_filestream_unmount(struct xfs_mount *mp); |
117 | void xfs_filestream_flush(struct xfs_mount *mp); | ||
118 | xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip); | 138 | xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip); |
119 | int xfs_filestream_associate(struct xfs_inode *dip, struct xfs_inode *ip); | 139 | int xfs_filestream_associate(struct xfs_inode *dip, struct xfs_inode *ip); |
120 | void xfs_filestream_deassociate(struct xfs_inode *ip); | 140 | void xfs_filestream_deassociate(struct xfs_inode *ip); |
@@ -122,7 +142,7 @@ int xfs_filestream_new_ag(struct xfs_bmalloca *ap, xfs_agnumber_t *agp); | |||
122 | 142 | ||
123 | 143 | ||
124 | /* filestreams for the inode? */ | 144 | /* filestreams for the inode? */ |
125 | STATIC_INLINE int | 145 | static inline int |
126 | xfs_inode_is_filestream( | 146 | xfs_inode_is_filestream( |
127 | struct xfs_inode *ip) | 147 | struct xfs_inode *ip) |
128 | { | 148 | { |