blob: 5cc7665e93c92be0dcc6eeb6b25c7261dfcfc942 [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
David Chinner2a82b8b2007-07-11 11:09:12 +10002/*
3 * Copyright (c) 2006-2007 Silicon Graphics, Inc.
4 * All Rights Reserved.
David Chinner2a82b8b2007-07-11 11:09:12 +10005 */
6#ifndef __XFS_FILESTREAM_H__
7#define __XFS_FILESTREAM_H__
8
David Chinner2a82b8b2007-07-11 11:09:12 +10009struct xfs_mount;
10struct xfs_inode;
David Chinner2a82b8b2007-07-11 11:09:12 +100011struct xfs_bmalloca;
12
David Chinner2a82b8b2007-07-11 11:09:12 +100013int xfs_filestream_mount(struct xfs_mount *mp);
14void xfs_filestream_unmount(struct xfs_mount *mp);
David Chinner2a82b8b2007-07-11 11:09:12 +100015void xfs_filestream_deassociate(struct xfs_inode *ip);
Christoph Hellwig2cd2ef62014-04-23 07:11:51 +100016xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip);
David Chinner2a82b8b2007-07-11 11:09:12 +100017int xfs_filestream_new_ag(struct xfs_bmalloca *ap, xfs_agnumber_t *agp);
Christoph Hellwigb94acd42014-04-23 07:11:52 +100018int xfs_filestream_peek_ag(struct xfs_mount *mp, xfs_agnumber_t agno);
David Chinner2a82b8b2007-07-11 11:09:12 +100019
Christoph Hellwigb8f82a42009-11-14 16:17:22 +000020static inline int
David Chinner2a82b8b2007-07-11 11:09:12 +100021xfs_inode_is_filestream(
22 struct xfs_inode *ip)
23{
24 return (ip->i_mount->m_flags & XFS_MOUNT_FILESTREAMS) ||
David Chinner2a82b8b2007-07-11 11:09:12 +100025 (ip->i_d.di_flags & XFS_DIFLAG_FILESTREAM);
26}
27
David Chinner2a82b8b2007-07-11 11:09:12 +100028#endif /* __XFS_FILESTREAM_H__ */