aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_filestream.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_filestream.h')
-rw-r--r--fs/xfs/xfs_filestream.h34
1 files changed, 2 insertions, 32 deletions
diff --git a/fs/xfs/xfs_filestream.h b/fs/xfs/xfs_filestream.h
index 6d61dbee8564..2ef43406e53b 100644
--- a/fs/xfs/xfs_filestream.h
+++ b/fs/xfs/xfs_filestream.h
@@ -20,50 +20,20 @@
20 20
21struct xfs_mount; 21struct xfs_mount;
22struct xfs_inode; 22struct xfs_inode;
23struct xfs_perag;
24struct xfs_bmalloca; 23struct xfs_bmalloca;
25 24
26#ifdef XFS_FILESTREAMS_TRACE
27#define XFS_FSTRM_KTRACE_INFO 1
28#define XFS_FSTRM_KTRACE_AGSCAN 2
29#define XFS_FSTRM_KTRACE_AGPICK1 3
30#define XFS_FSTRM_KTRACE_AGPICK2 4
31#define XFS_FSTRM_KTRACE_UPDATE 5
32#define XFS_FSTRM_KTRACE_FREE 6
33#define XFS_FSTRM_KTRACE_ITEM_LOOKUP 7
34#define XFS_FSTRM_KTRACE_ASSOCIATE 8
35#define XFS_FSTRM_KTRACE_MOVEAG 9
36#define XFS_FSTRM_KTRACE_ORPHAN 10
37
38#define XFS_FSTRM_KTRACE_SIZE 16384
39extern ktrace_t *xfs_filestreams_trace_buf;
40
41#endif
42
43/* allocation selection flags */
44typedef enum xfs_fstrm_alloc {
45 XFS_PICK_USERDATA = 1,
46 XFS_PICK_LOWSPACE = 2,
47} xfs_fstrm_alloc_t;
48
49/* prototypes for filestream.c */
50int xfs_filestream_init(void);
51void xfs_filestream_uninit(void);
52int xfs_filestream_mount(struct xfs_mount *mp); 25int xfs_filestream_mount(struct xfs_mount *mp);
53void xfs_filestream_unmount(struct xfs_mount *mp); 26void xfs_filestream_unmount(struct xfs_mount *mp);
54xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip);
55int xfs_filestream_associate(struct xfs_inode *dip, struct xfs_inode *ip);
56void xfs_filestream_deassociate(struct xfs_inode *ip); 27void xfs_filestream_deassociate(struct xfs_inode *ip);
28xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip);
57int xfs_filestream_new_ag(struct xfs_bmalloca *ap, xfs_agnumber_t *agp); 29int xfs_filestream_new_ag(struct xfs_bmalloca *ap, xfs_agnumber_t *agp);
30int xfs_filestream_peek_ag(struct xfs_mount *mp, xfs_agnumber_t agno);
58 31
59
60/* filestreams for the inode? */
61static inline int 32static inline int
62xfs_inode_is_filestream( 33xfs_inode_is_filestream(
63 struct xfs_inode *ip) 34 struct xfs_inode *ip)
64{ 35{
65 return (ip->i_mount->m_flags & XFS_MOUNT_FILESTREAMS) || 36 return (ip->i_mount->m_flags & XFS_MOUNT_FILESTREAMS) ||
66 xfs_iflags_test(ip, XFS_IFILESTREAM) ||
67 (ip->i_d.di_flags & XFS_DIFLAG_FILESTREAM); 37 (ip->i_d.di_flags & XFS_DIFLAG_FILESTREAM);
68} 38}
69 39